From 07f67d8612ca547975a153b8291b077e68058a8a Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Thu, 20 Oct 2011 13:46:05 +0200 Subject: [PATCH] s3:libsmb/smb_seal: always use SAFE_FREE(buf) in common_free_enc_buffer() There's no need to do gss-api specific stuff, the buffer is always malloc'ed. metze --- source3/libsmb/smb_seal.c | 15 +-------------- 1 file changed, 1 insertion(+), 14 deletions(-) diff --git a/source3/libsmb/smb_seal.c b/source3/libsmb/smb_seal.c index 935144dacc9..950f3e3822f 100644 --- a/source3/libsmb/smb_seal.c +++ b/source3/libsmb/smb_seal.c @@ -444,18 +444,5 @@ void common_free_enc_buffer(struct smb_trans_enc_state *es, char *buf) return; } - if (es->smb_enc_type == SMB_TRANS_ENC_NTLM) { - SAFE_FREE(buf); - return; - } - -#if defined(HAVE_GSSAPI) && defined(HAVE_KRB5) - if (es->smb_enc_type == SMB_TRANS_ENC_GSS) { - OM_uint32 min; - gss_buffer_desc rel_buf; - rel_buf.value = buf; - rel_buf.length = smb_len_nbt(buf) + 4; - gss_release_buffer(&min, &rel_buf); - } -#endif + SAFE_FREE(buf); } -- 2.34.1