[asterisk-commits] mjordan: branch 11 r372583 - in /branches/11: ./ apps/app_minivm.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Thu Sep 6 21:26:42 CDT 2012


Author: mjordan
Date: Thu Sep  6 21:26:40 2012
New Revision: 372583

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=372583
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

Modified:
    branches/11/   (props changed)
    branches/11/apps/app_minivm.c

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

Modified: branches/11/apps/app_minivm.c
URL: http://svnview.digium.com/svn/asterisk/branches/11/apps/app_minivm.c?view=diff&rev=372583&r1=372582&r2=372583
==============================================================================
--- branches/11/apps/app_minivm.c (original)
+++ branches/11/apps/app_minivm.c Thu Sep  6 21:26:40 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 asterisk-commits mailing list