Wat? That doesn't look right at all, you allocate memory, overwrite the pointer with the return value of getgrnam and then even call efree on NULL.