s3:libsmb/smb_seal: always use SAFE_FREE(buf) in common_free_enc_buffer()
authorStefan Metzmacher <metze@samba.org>
Thu, 20 Oct 2011 11:46:05 +0000 (13:46 +0200)
committerStefan Metzmacher <metze@samba.org>
Fri, 21 Oct 2011 06:43:01 +0000 (08:43 +0200)
There's no need to do gss-api specific stuff, the buffer is always
malloc'ed.

metze

source3/libsmb/smb_seal.c

index 935144dacc97e077090f24327805f21e3cf001d0..950f3e3822f0c1c9ecf92e40131286c52bfaf6bd 100644 (file)
@@ -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);
 }