[asterisk-commits] russell: trunk r360362 - in /trunk: ./ apps/app_jack.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Fri Mar 23 22:03:23 CDT 2012


Author: russell
Date: Fri Mar 23 22:03:20 2012
New Revision: 360362

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=360362
Log:
app_jack: fix datastore memory leak in error handling path.
........

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

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

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

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

Modified: trunk/apps/app_jack.c
URL: http://svnview.digium.com/svn/asterisk/trunk/apps/app_jack.c?view=diff&rev=360362&r1=360361&r2=360362
==============================================================================
--- trunk/apps/app_jack.c (original)
+++ trunk/apps/app_jack.c Fri Mar 23 22:03:20 2012
@@ -904,8 +904,14 @@
 return_error:
 	ast_channel_unlock(chan);
 
-	if (jack_data)
+	if (jack_data) {
 		destroy_jack_data(jack_data);
+	}
+
+	if (datastore) {
+		datastore->data = NULL;
+		ast_datastore_free(datastore);
+	}
 
 	return -1;
 }




More information about the asterisk-commits mailing list