[asterisk-commits] russell: branch 1.8 r360360 - /branches/1.8/apps/app_jack.c

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


Author: russell
Date: Fri Mar 23 22:01:20 2012
New Revision: 360360

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

Modified:
    branches/1.8/apps/app_jack.c

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