Fix more valgrind issues.
[samba.git] / source4 / ldap_server / ldap_server.c
index 5b2519c035a7845d9d152c3bccdea1da867562c4..ce80941e03fc8be5dfffca3d3e40ca2efe3adfed 100644 (file)
@@ -155,8 +155,10 @@ static NTSTATUS ldapsrv_decode(void *private, DATA_BLOB blob)
        }
 
        data_blob_free(&blob);
-       ldapsrv_process_message(conn, msg);
+       talloc_steal(conn, msg);
        asn1_free(asn1);
+
+       ldapsrv_process_message(conn, msg);
        return NT_STATUS_OK;
 }