summaryrefslogtreecommitdiffstats
path: root/source
diff options
context:
space:
mode:
authorVolker Lendecke <vlendec@samba.org>2004-09-21 07:55:49 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 10:52:44 -0500
commit587d863ae87042e0193b8d27b52ab3f75c58974b (patch)
treedd3173de2a4df963ef27c0e14799db032f8fbdf6 /source
parent9481f2a79e83b0dae9141f65ccc59e59bcf682e7 (diff)
downloadsamba-587d863ae87042e0193b8d27b52ab3f75c58974b.tar.gz
samba-587d863ae87042e0193b8d27b52ab3f75c58974b.tar.xz
samba-587d863ae87042e0193b8d27b52ab3f75c58974b.zip
r2466: Fix memleak found by sean.chandler@verizon.net.
Thanks! Volker
Diffstat (limited to 'source')
-rw-r--r--source/libsmb/cliconnect.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/source/libsmb/cliconnect.c b/source/libsmb/cliconnect.c
index 98656c119d3..4ff60c1b1ca 100644
--- a/source/libsmb/cliconnect.c
+++ b/source/libsmb/cliconnect.c
@@ -668,11 +668,16 @@ static NTSTATUS cli_session_setup_ntlmssp(struct cli_state *cli, const char *use
DATA_BLOB key = data_blob(ntlmssp_state->session_key.data,
ntlmssp_state->session_key.length);
DATA_BLOB null_blob = data_blob(NULL, 0);
+ BOOL res;
fstrcpy(cli->server_domain, ntlmssp_state->server_domain);
cli_set_session_key(cli, ntlmssp_state->session_key);
- if (cli_simple_set_signing(cli, key, null_blob)) {
+ res = cli_simple_set_signing(cli, key, null_blob);
+
+ data_blob_free(&key);
+
+ if (res) {
/* 'resign' the last message, so we get the right sequence numbers
for checking the first reply from the server */