From 55809f5029788892919bd7f6ec305ae9df858038 Mon Sep 17 00:00:00 2001 From: Simo Sorce Date: Wed, 9 Apr 2008 17:11:57 -0400 Subject: Make sure we do not reference req after it has been freed (This used to be commit a13f64bf54afc22516d1f6a786dfec67389cb754) --- source4/libcli/cldap/cldap.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'source4') diff --git a/source4/libcli/cldap/cldap.c b/source4/libcli/cldap/cldap.c index d10eeb8ffd..d9910285d9 100644 --- a/source4/libcli/cldap/cldap.c +++ b/source4/libcli/cldap/cldap.c @@ -601,8 +601,11 @@ NTSTATUS cldap_netlogon_recv(struct cldap_request *req, NTSTATUS status; enum ndr_err_code ndr_err; struct cldap_search search; + struct cldap_socket *cldap; DATA_BLOB *data; + cldap = req->cldap; + status = cldap_search_recv(req, mem_ctx, &search); if (!NT_STATUS_IS_OK(status)) { return status; @@ -620,7 +623,7 @@ NTSTATUS cldap_netlogon_recv(struct cldap_request *req, data = search.out.response->attributes[0].values; ndr_err = ndr_pull_union_blob_all(data, mem_ctx, - req->cldap->iconv_convenience, + cldap->iconv_convenience, &io->out.netlogon, io->in.version & 0xF, (ndr_pull_flags_fn_t)ndr_pull_nbt_cldap_netlogon); -- cgit