[svn-commits] mjordan: trunk r372584 - in /trunk: ./ apps/app_minivm.c

SVN commits to the Digium repositories svn-commits at lists.digium.com
Thu Sep 6 21:27:45 CDT 2012


Author: mjordan
Date: Thu Sep  6 21:27:42 2012
New Revision: 372584

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=372584
Log:
Free ast_str objects when temp file fails to be created in MiniVM

The previous commit (r372554) was from a patch that was written before
r366880, which ensured that ast_str objects allocated in the sendmail
routine were free'd in off nominal paths.  This commit frees the
string objects in the off nominal path introduced in r372554.

(issue ASTERISK-17133)
Reported by: Tzafrir Cohen
........

Merged revisions 372581 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........

Merged revisions 372582 from http://svn.asterisk.org/svn/asterisk/branches/10
........

Merged revisions 372583 from http://svn.asterisk.org/svn/asterisk/branches/11

Modified:
    trunk/   (props changed)
    trunk/apps/app_minivm.c

Propchange: trunk/
------------------------------------------------------------------------------
Binary property 'branch-11-merged' - no diff available.

Modified: trunk/apps/app_minivm.c
URL: http://svnview.digium.com/svn/asterisk/trunk/apps/app_minivm.c?view=diff&rev=372584&r1=372583&r2=372584
==============================================================================
--- trunk/apps/app_minivm.c (original)
+++ trunk/apps/app_minivm.c Thu Sep  6 21:27:42 2012
@@ -1277,6 +1277,8 @@
 		tmpfd = mkstemp(newtmp);
 		if (tmpfd < 0) {
 			ast_log(LOG_WARNING, "Failed to create temporary file for volgain: %d\n", errno);
+			ast_free(str1);
+			ast_free(str2);
 			return -1;
 		}
 		snprintf(tmpcmd, sizeof(tmpcmd), "sox -v %.4f %s.%s %s.%s", vmu->volgain, filename, format, newtmp, format);




More information about the svn-commits mailing list