summaryrefslogtreecommitdiff
path: root/source3/libsmb/clientgen.c
diff options
context:
space:
mode:
Diffstat (limited to 'source3/libsmb/clientgen.c')
-rw-r--r--source3/libsmb/clientgen.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/source3/libsmb/clientgen.c b/source3/libsmb/clientgen.c
index 6186387076..450a7cf4cd 100644
--- a/source3/libsmb/clientgen.c
+++ b/source3/libsmb/clientgen.c
@@ -650,6 +650,12 @@ struct cli_state *cli_initialise_ex(int signing_state)
goto error;
}
+ cli->outgoing = tevent_queue_create(cli, "cli_outgoing");
+ if (cli->outgoing == NULL) {
+ goto error;
+ }
+ cli->pending = NULL;
+
cli->initialised = 1;
return cli;
@@ -740,6 +746,12 @@ void cli_shutdown(struct cli_state *cli)
cli->fd = -1;
cli->smb_rw_error = SMB_READ_OK;
+ /*
+ * Need to free pending first, they remove themselves
+ */
+ while (cli->pending) {
+ talloc_free(cli->pending[0]);
+ }
TALLOC_FREE(cli);
}