summaryrefslogtreecommitdiff
path: root/source3/libsmb
diff options
context:
space:
mode:
authorVolker Lendecke <vl@samba.org>2009-03-15 11:58:07 +0100
committerVolker Lendecke <vl@samba.org>2009-03-15 12:01:20 +0100
commit8afd835cea1a8138a4e21702e610b0b0e9904700 (patch)
tree95faca5ed4e1e2bf5502624866ebf04610f98e5d /source3/libsmb
parent5fa4cf283f3f8bcf3c3399882f2e08ef902424c5 (diff)
downloadsamba-8afd835cea1a8138a4e21702e610b0b0e9904700.tar.gz
samba-8afd835cea1a8138a4e21702e610b0b0e9904700.tar.bz2
samba-8afd835cea1a8138a4e21702e610b0b0e9904700.zip
Fix a malloc/talloc mismatch when cli_initialise() fails
Diffstat (limited to 'source3/libsmb')
-rw-r--r--source3/libsmb/clientgen.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/source3/libsmb/clientgen.c b/source3/libsmb/clientgen.c
index 295ccae456..c1ba4e5c4f 100644
--- a/source3/libsmb/clientgen.c
+++ b/source3/libsmb/clientgen.c
@@ -493,8 +493,7 @@ struct cli_state *cli_initialise_ex(int signing_state)
cli->dfs_mountpoint = talloc_strdup(cli, "");
if (!cli->dfs_mountpoint) {
- TALLOC_FREE(cli);
- return NULL;
+ goto error;
}
cli->port = 0;
cli->fd = -1;
@@ -571,7 +570,7 @@ struct cli_state *cli_initialise_ex(int signing_state)
SAFE_FREE(cli->inbuf);
SAFE_FREE(cli->outbuf);
- SAFE_FREE(cli);
+ TALLOC_FREE(cli);
return NULL;
}