svn commit: samba r24828 - in branches: SAMBA_3_2/source/utils SAMBA_3_2_0/source/utils

obnox at samba.org obnox at samba.org
Fri Aug 31 10:06:41 GMT 2007


Author: obnox
Date: 2007-08-31 10:06:37 +0000 (Fri, 31 Aug 2007)
New Revision: 24828

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

Log:
Give smbcontrol an initial talloc stackframe.


Modified:
   branches/SAMBA_3_2/source/utils/smbcontrol.c
   branches/SAMBA_3_2_0/source/utils/smbcontrol.c


Changeset:
Modified: branches/SAMBA_3_2/source/utils/smbcontrol.c
===================================================================
--- branches/SAMBA_3_2/source/utils/smbcontrol.c	2007-08-31 09:54:30 UTC (rev 24827)
+++ branches/SAMBA_3_2/source/utils/smbcontrol.c	2007-08-31 10:06:37 UTC (rev 24828)
@@ -1256,6 +1256,8 @@
 		POPT_COMMON_SAMBA
 		POPT_TABLEEND
 	};
+	TALLOC_CTX *frame = talloc_stackframe();
+	int ret = 0;
 
 	load_case_tables();
 
@@ -1305,8 +1307,11 @@
 	if (!(evt_ctx = event_context_init(NULL)) ||
 	    !(msg_ctx = messaging_init(NULL, server_id_self(), evt_ctx))) {
 		fprintf(stderr, "could not init messaging context\n");
+		TALLOC_FREE(frame);
 		exit(1);
 	}
 	
-	return !do_command(msg_ctx, argc, argv);
+	ret = !do_command(msg_ctx, argc, argv);
+	TALLOC_FREE(frame);
+	return ret;
 }

Modified: branches/SAMBA_3_2_0/source/utils/smbcontrol.c
===================================================================
--- branches/SAMBA_3_2_0/source/utils/smbcontrol.c	2007-08-31 09:54:30 UTC (rev 24827)
+++ branches/SAMBA_3_2_0/source/utils/smbcontrol.c	2007-08-31 10:06:37 UTC (rev 24828)
@@ -1256,6 +1256,8 @@
 		POPT_COMMON_SAMBA
 		POPT_TABLEEND
 	};
+	TALLOC_CTX *frame = talloc_stackframe();
+	int ret = 0;
 
 	load_case_tables();
 
@@ -1305,8 +1307,11 @@
 	if (!(evt_ctx = event_context_init(NULL)) ||
 	    !(msg_ctx = messaging_init(NULL, server_id_self(), evt_ctx))) {
 		fprintf(stderr, "could not init messaging context\n");
+		TALLOC_FREE(frame);
 		exit(1);
 	}
 	
-	return !do_command(msg_ctx, argc, argv);
+	ret = !do_command(msg_ctx, argc, argv);
+	TALLOC_FREE(frame);
+	return ret;
 }



More information about the samba-cvs mailing list