s4-ildap: fixed a talloc_steal with references error
authorAndrew Tridgell <tridge@samba.org>
Mon, 27 Sep 2010 19:54:26 +0000 (12:54 -0700)
committerAndrew Tridgell <tridge@samba.org>
Mon, 27 Sep 2010 20:38:00 +0000 (20:38 +0000)
We need talloc_reparent() instead

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>

Autobuild-User: Andrew Tridgell <tridge@samba.org>
Autobuild-Date: Mon Sep 27 20:38:00 UTC 2010 on sn-devel-104

source4/libcli/ldap/ldap_ildap.c

index 77bf3f0a35b8612e7ff863c86bebdbda748c5263..10fe8e491658705d0653269849304c05d269f84f 100644 (file)
@@ -73,7 +73,7 @@ _PUBLIC_ NTSTATUS ildap_search_bytree(struct ldap_connection *conn, const char *
        msg->controls = control_req;
 
        req = ldap_request_send(conn, msg);
-       talloc_steal(msg, req);
+       talloc_reparent(conn, msg, req);
        
        for (i=n=0;true;i++) {
                struct ldap_message *res;