For probing whether a connection is a live a rootdse search might be
interesting where we don't really care for the result, only success or
failure of the operation.
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
rc = TLDAP_OPERATIONS_ERROR;
goto fail;
}
- rc = tldap_search_all_recv(req, mem_ctx, &msgs, &result);
+ rc = tldap_search_all_recv(req, frame, &msgs, &result);
TALLOC_FREE(req);
if (!TLDAP_RC_IS_SUCCESS(rc)) {
goto fail;
TALLOC_FREE(ld->last_msg);
ld->last_msg = talloc_move(ld, &result);
- *pmsgs = msgs;
+ if (pmsgs != NULL) {
+ *pmsgs = talloc_move(mem_ctx, &msgs);
+ }
fail:
TALLOC_FREE(frame);
return rc;