extdom: fix wrong realloc size

Reviewed-By: Alexander Bokovoy <abokovoy@redhat.com>
Reviewed-By: Sumit Bose <sbose@redhat.com>
This commit is contained in:
Sumit Bose 2015-02-25 10:28:22 +01:00 committed by Petr Vobornik
parent 447c5c7b0d
commit fd8e796873

View File

@ -386,7 +386,7 @@ static int get_user_grouplist(const char *name, gid_t gid,
ret = getgrouplist(name, gid, groups, &ngroups);
if (ret == -1) {
new_groups = realloc(groups, ngroups);
new_groups = realloc(groups, ngroups * sizeof(gid_t));
if (new_groups == NULL) {
free(groups);
return LDAP_OPERATIONS_ERROR;