[asterisk-commits] mmichelson: branch group/CCSS r238356 - /team/group/CCSS/main/ccss.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Thu Jan 7 11:08:35 CST 2010


Author: mmichelson
Date: Thu Jan  7 11:08:32 2010
New Revision: 238356

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=238356
Log:
Fix the memory leak in a way that actually works.


Modified:
    team/group/CCSS/main/ccss.c

Modified: team/group/CCSS/main/ccss.c
URL: http://svnview.digium.com/svn/asterisk/team/group/CCSS/main/ccss.c?view=diff&rev=238356&r1=238355&r2=238356
==============================================================================
--- team/group/CCSS/main/ccss.c (original)
+++ team/group/CCSS/main/ccss.c Thu Jan  7 11:08:32 2010
@@ -3297,6 +3297,7 @@
 {
 	struct ast_frame frame = {0,};
 	char chan_name[AST_CHANNEL_NAME];
+	int retval;
 
 	ast_channel_get_device_name(chan, chan_name, sizeof(chan_name));
 
@@ -3309,7 +3310,9 @@
 		/* Frame building failed. We can't use this. */
 		return -1;
 	}
-	return ast_queue_frame(chan, &frame);
+	retval = ast_queue_frame(chan, &frame);
+	ast_frfree(&frame);
+	return retval;
 }
 
 int ast_cc_build_frame(struct ast_channel *chan, struct ast_cc_config_params *cc_params, const char * const interface_name,




More information about the asterisk-commits mailing list