[svn-commits] mmichelson: trunk r130854 - /trunk/main/asterisk.c

SVN commits to the Digium repositories svn-commits at lists.digium.com
Mon Jul 14 17:22:58 CDT 2008


Author: mmichelson
Date: Mon Jul 14 17:22:57 2008
New Revision: 130854

URL: http://svn.digium.com/view/asterisk?view=rev&rev=130854
Log:
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:
    trunk/main/asterisk.c

Modified: trunk/main/asterisk.c
URL: http://svn.digium.com/view/asterisk/trunk/main/asterisk.c?view=diff&rev=130854&r1=130853&r2=130854
==============================================================================
--- trunk/main/asterisk.c (original)
+++ trunk/main/asterisk.c Mon Jul 14 17:22:57 2008
@@ -2881,8 +2881,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 svn-commits mailing list