From fc2cca5c28a603dc656b405019f82cafbe0c1d6a Mon Sep 17 00:00:00 2001 From: Volker Lendecke Date: Sat, 3 Apr 2010 22:20:04 +0200 Subject: libwbclient: Make wbcGetGroups not use talloc --- nsswitch/libwbclient/wbc_pwd.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'nsswitch') diff --git a/nsswitch/libwbclient/wbc_pwd.c b/nsswitch/libwbclient/wbc_pwd.c index 86d54a0f75..c7bfdb8fd8 100644 --- a/nsswitch/libwbclient/wbc_pwd.c +++ b/nsswitch/libwbclient/wbc_pwd.c @@ -599,7 +599,8 @@ wbcErr wbcGetGroups(const char *account, &response); BAIL_ON_WBC_ERROR(wbc_status); - groups = talloc_array(NULL, gid_t, response.data.num_entries); + groups = (gid_t *)wbcAllocateMemory( + sizeof(gid_t), response.data.num_entries, NULL); BAIL_ON_PTR_ERROR(groups, wbc_status); for (i = 0; i < response.data.num_entries; i++) { @@ -614,9 +615,6 @@ wbcErr wbcGetGroups(const char *account, done: winbindd_free_response(&response); - if (groups) { - talloc_free(groups); - } - + wbcFreeMemory(groups); return wbc_status; } -- cgit