libwbclient: Make wbcLookupUserSids not use talloc
authorVolker Lendecke <vl@samba.org>
Sat, 3 Apr 2010 11:45:36 +0000 (13:45 +0200)
committerVolker Lendecke <vl@samba.org>
Mon, 19 Apr 2010 12:27:20 +0000 (14:27 +0200)
nsswitch/libwbclient/wbc_sid.c

index 5a003b1f8840318ebdbdcd0e632d07af95db9460..2130077cd93b8655e5c3ba25319d42059c93331f 100644 (file)
@@ -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;