]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
r21916: Fix couple of "return" calls on void functions.
authorJeremy Allison <jra@samba.org>
Wed, 21 Mar 2007 18:33:13 +0000 (18:33 +0000)
committerGerald (Jerry) Carter <jerry@samba.org>
Wed, 10 Oct 2007 17:18:48 +0000 (12:18 -0500)
Ensure we ignore reqests to free keepalive buffers
as we only copied these.
Jeremy.

source/libsmb/smb_seal.c

index 7a27f88a2ee0afe68f339a1fe431ad44625b39e3..9ea3a103509dfb5a405c7797125867c05a9d2690 100644 (file)
@@ -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);
 }
 
 /******************************************************************************