[asterisk-commits] coreyfarrell: branch 13 r426252 - /branches/13/funcs/func_cdr.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Tue Oct 28 06:11:17 CDT 2014


Author: coreyfarrell
Date: Tue Oct 28 06:11:13 2014
New Revision: 426252

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=426252
Log:
func_cdr: Fix CDR_PROP payload leak

Remove duplicate allocation of payload, preventing leak.

ASTERISK-24455 #close
Reported by: Corey Farrell
Review: https://reviewboard.asterisk.org/r/4113/

Modified:
    branches/13/funcs/func_cdr.c

Modified: branches/13/funcs/func_cdr.c
URL: http://svnview.digium.com/svn/asterisk/branches/13/funcs/func_cdr.c?view=diff&rev=426252&r1=426251&r2=426252
==============================================================================
--- branches/13/funcs/func_cdr.c (original)
+++ branches/13/funcs/func_cdr.c Tue Oct 28 06:11:13 2014
@@ -540,8 +540,7 @@
 		     const char *value)
 {
 	RAII_VAR(struct stasis_message *, message, NULL, ao2_cleanup);
-	RAII_VAR(struct cdr_func_payload *, payload,
-		ao2_alloc(sizeof(*payload), NULL), ao2_cleanup);
+	RAII_VAR(struct cdr_func_payload *, payload, NULL, ao2_cleanup);
 	RAII_VAR(struct stasis_message_router *, router, ast_cdr_message_router(), ao2_cleanup);
 
 	if (!chan) {




More information about the asterisk-commits mailing list