[asterisk-commits] mmichelson: branch 1.6.0 r130855 - in /branches/1.6.0: ./ main/asterisk.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Mon Jul 14 17:24:01 CDT 2008


Author: mmichelson
Date: Mon Jul 14 17:24:01 2008
New Revision: 130855

URL: http://svn.digium.com/view/asterisk?view=rev&rev=130855
Log:
Merged revisions 130854 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/trunk

........
r130854 | mmichelson | 2008-07-14 17:22:57 -0500 (Mon, 14 Jul 2008) | 9 lines

Fix a memory leak in the case that /dev/null cannot be
opened when running startup commands from cli.conf

(closes issue #13066)
Reported by: eliel
Patches:
      asterisk.c.patch uploaded by eliel (license 64)


........

Modified:
    branches/1.6.0/   (props changed)
    branches/1.6.0/main/asterisk.c

Propchange: branches/1.6.0/
------------------------------------------------------------------------------
Binary property 'trunk-merged' - no diff available.

Modified: branches/1.6.0/main/asterisk.c
URL: http://svn.digium.com/view/asterisk/branches/1.6.0/main/asterisk.c?view=diff&rev=130855&r1=130854&r2=130855
==============================================================================
--- branches/1.6.0/main/asterisk.c (original)
+++ branches/1.6.0/main/asterisk.c Mon Jul 14 17:24:01 2008
@@ -2845,8 +2845,10 @@
 		return;
 
 	fd = open("/dev/null", O_RDWR);
-	if (fd < 0)
+	if (fd < 0) {
+		ast_config_destroy(cfg);
 		return;
+	}
 
 	for (v = ast_variable_browse(cfg, "startup_commands"); v; v = v->next) {
 		if (ast_true(v->value))




More information about the asterisk-commits mailing list