[asterisk-commits] russell: branch 10 r360361 - in /branches/10: ./ apps/app_jack.c

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


Author: russell
Date: Fri Mar 23 22:02:15 2012
New Revision: 360361

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

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

Modified:
    branches/10/   (props changed)
    branches/10/apps/app_jack.c

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

Modified: branches/10/apps/app_jack.c
URL: http://svnview.digium.com/svn/asterisk/branches/10/apps/app_jack.c?view=diff&rev=360361&r1=360360&r2=360361
==============================================================================
--- branches/10/apps/app_jack.c (original)
+++ branches/10/apps/app_jack.c Fri Mar 23 22:02:15 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