diff options
author | Volker Lendecke <vl@samba.org> | 2010-04-03 22:20:04 +0200 |
---|---|---|
committer | Volker Lendecke <vl@samba.org> | 2010-04-19 14:27:21 +0200 |
commit | fc2cca5c28a603dc656b405019f82cafbe0c1d6a (patch) | |
tree | e4c6c4ac66261eb6f9c84a549fd27b26283ae800 /nsswitch | |
parent | f6a34cb0e0305e0b5d393e4ee7a8ae86bde1e9a7 (diff) | |
download | samba-fc2cca5c28a603dc656b405019f82cafbe0c1d6a.tar.gz samba-fc2cca5c28a603dc656b405019f82cafbe0c1d6a.tar.bz2 samba-fc2cca5c28a603dc656b405019f82cafbe0c1d6a.zip |
libwbclient: Make wbcGetGroups not use talloc
Diffstat (limited to 'nsswitch')
-rw-r--r-- | nsswitch/libwbclient/wbc_pwd.c | 8 |
1 files changed, 3 insertions, 5 deletions
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; } |