summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2007-03-21 18:33:13 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 12:18:48 -0500
commit56c777882f0e9fc64e69290db8f6db5fe90225fd (patch)
treea7a7432d5d559eeb11f8e0ba903bee1059933dc2 /source3
parent3f85405be0465edf06feef96657d2b5d287b064e (diff)
downloadsamba-56c777882f0e9fc64e69290db8f6db5fe90225fd.tar.gz
samba-56c777882f0e9fc64e69290db8f6db5fe90225fd.tar.bz2
samba-56c777882f0e9fc64e69290db8f6db5fe90225fd.zip
r21916: Fix couple of "return" calls on void functions.
Ensure we ignore reqests to free keepalive buffers as we only copied these. Jeremy. (This used to be commit a184bdbe3c7bf0c44a8141898bfcb9971a332312)
Diffstat (limited to 'source3')
-rw-r--r--source3/libsmb/smb_seal.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/source3/libsmb/smb_seal.c b/source3/libsmb/smb_seal.c
index 7a27f88a2e..9ea3a10350 100644
--- a/source3/libsmb/smb_seal.c
+++ b/source3/libsmb/smb_seal.c
@@ -238,6 +238,14 @@ void common_free_enc_buffer(struct smb_trans_enc_state *es, char *buf)
return;
}
+ /* We know this is an smb buffer, and we
+ * didn't malloc, only copy, for a keepalive,
+ * so ignore session keepalives. */
+
+ if(CVAL(buf,0) == SMBkeepalive) {
+ return;
+ }
+
if (es->smb_enc_type == SMB_TRANS_ENC_NTLM) {
SAFE_FREE(buf);
return;
@@ -267,7 +275,7 @@ BOOL cli_encryption_on(struct cli_state *cli)
void cli_free_encryption_context(struct cli_state *cli)
{
- return common_free_encryption_state(&cli->trans_enc_state);
+ common_free_encryption_state(&cli->trans_enc_state);
}
/******************************************************************************
@@ -276,7 +284,7 @@ void cli_free_encryption_context(struct cli_state *cli)
void cli_free_enc_buffer(struct cli_state *cli, char *buf)
{
- return common_free_enc_buffer(cli->trans_enc_state, buf);
+ common_free_enc_buffer(cli->trans_enc_state, buf);
}
/******************************************************************************