[svn-commits] mjordan: branch 1.8 r372581 - /branches/1.8/apps/app_minivm.c

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


Author: mjordan
Date: Thu Sep  6 21:24:44 2012
New Revision: 372581

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

Modified:
    branches/1.8/apps/app_minivm.c

Modified: branches/1.8/apps/app_minivm.c
URL: http://svnview.digium.com/svn/asterisk/branches/1.8/apps/app_minivm.c?view=diff&rev=372581&r1=372580&r2=372581
==============================================================================
--- branches/1.8/apps/app_minivm.c (original)
+++ branches/1.8/apps/app_minivm.c Thu Sep  6 21:24:44 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