From 3015c6ba0435c9e99c202890e50187db891d761d Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Fri, 11 Nov 2005 07:38:25 +0000 Subject: r11669: - make sure req is initialized - call async callback on error metze (This used to be commit 43aa5cffd3fd8bf07b236a039f5146e1e44296c6) --- source4/libcli/raw/clitransport.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/source4/libcli/raw/clitransport.c b/source4/libcli/raw/clitransport.c index 2aebb92790..fba6c36bbe 100644 --- a/source4/libcli/raw/clitransport.c +++ b/source4/libcli/raw/clitransport.c @@ -347,7 +347,7 @@ static NTSTATUS smbcli_transport_finish_recv(void *private, DATA_BLOB blob) uint8_t *buffer, *hdr, *vwv; int len; uint16_t wct=0, mid = 0, op = 0; - struct smbcli_request *req; + struct smbcli_request *req = NULL; buffer = blob.data; len = blob.length; @@ -482,6 +482,9 @@ error: if (req) { DLIST_REMOVE(transport->pending_recv, req); req->state = SMBCLI_REQUEST_ERROR; + if (req->async.fn) { + req->async.fn(req); + } } else { talloc_free(buffer); } -- cgit