diff options
-rw-r--r-- | nsswitch/libwbclient/wbc_sid.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/nsswitch/libwbclient/wbc_sid.c b/nsswitch/libwbclient/wbc_sid.c index 5a003b1f88..2130077cd9 100644 --- a/nsswitch/libwbclient/wbc_sid.c +++ b/nsswitch/libwbclient/wbc_sid.c @@ -444,8 +444,9 @@ wbcErr wbcLookupUserSids(const struct wbcDomainSid *user_sid, BAIL_ON_WBC_ERROR(wbc_status); } - sids = talloc_array(NULL, struct wbcDomainSid, - response.data.num_entries); + sids = (struct wbcDomainSid *)wbcAllocateMemory( + response.data.num_entries, sizeof(struct wbcDomainSid), + NULL); BAIL_ON_PTR_ERROR(sids, wbc_status); s = (const char *)response.extra_data.data; @@ -467,7 +468,7 @@ wbcErr wbcLookupUserSids(const struct wbcDomainSid *user_sid, done: winbindd_free_response(&response); if (sids) { - talloc_free(sids); + wbcFreeMemory(sids); } return wbc_status; |