summaryrefslogtreecommitdiff
path: root/nsswitch/libwbclient
diff options
context:
space:
mode:
authorVolker Lendecke <vl@samba.org>2010-04-03 22:20:04 +0200
committerVolker Lendecke <vl@samba.org>2010-04-19 14:27:21 +0200
commitfc2cca5c28a603dc656b405019f82cafbe0c1d6a (patch)
treee4c6c4ac66261eb6f9c84a549fd27b26283ae800 /nsswitch/libwbclient
parentf6a34cb0e0305e0b5d393e4ee7a8ae86bde1e9a7 (diff)
downloadsamba-fc2cca5c28a603dc656b405019f82cafbe0c1d6a.tar.gz
samba-fc2cca5c28a603dc656b405019f82cafbe0c1d6a.tar.bz2
samba-fc2cca5c28a603dc656b405019f82cafbe0c1d6a.zip
libwbclient: Make wbcGetGroups not use talloc
Diffstat (limited to 'nsswitch/libwbclient')
-rw-r--r--nsswitch/libwbclient/wbc_pwd.c8
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;
}