svn commit: samba r24129 - in branches/SAMBA_3_2_0/source/libads: .

metze at samba.org metze at samba.org
Thu Aug 2 15:12:33 GMT 2007


Author: metze
Date: 2007-08-02 15:12:32 +0000 (Thu, 02 Aug 2007)
New Revision: 24129

WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=24129

Log:
merge from SAMBA_3_2:
fix double free in error path

metze
Modified:
   branches/SAMBA_3_2_0/source/libads/sasl.c


Changeset:
Modified: branches/SAMBA_3_2_0/source/libads/sasl.c
===================================================================
--- branches/SAMBA_3_2_0/source/libads/sasl.c	2007-08-02 15:11:37 UTC (rev 24128)
+++ branches/SAMBA_3_2_0/source/libads/sasl.c	2007-08-02 15:12:32 UTC (rev 24129)
@@ -962,11 +962,10 @@
 					  &output_token,
 					  &ret_flags,
 					  NULL);
-
-		if (input_token.value) {
-			gss_release_buffer(&minor_status, &input_token);
+		if (scred) {
+			ber_bvfree(scred);
+			scred = NULL;
 		}
-
 		if (gss_rc && gss_rc != GSS_S_CONTINUE_NEEDED) {
 			status = ADS_ERROR_GSS(gss_rc, minor_status);
 			goto failed;
@@ -999,13 +998,15 @@
 
 	gss_rc = gss_unwrap(&minor_status,context_handle,&input_token,&output_token,
 			    &conf_state,NULL);
+	if (scred) {
+		ber_bvfree(scred);
+		scred = NULL;
+	}
 	if (gss_rc) {
 		status = ADS_ERROR_GSS(gss_rc, minor_status);
 		goto failed;
 	}
 
-	gss_release_buffer(&minor_status, &input_token);
-
 	p = (uint8 *)output_token.value;
 
 #if 0



More information about the samba-cvs mailing list