diff options
author | Corey Farrell <git@cfware.com> | 2014-10-28 11:11:13 +0000 |
---|---|---|
committer | Corey Farrell <git@cfware.com> | 2014-10-28 11:11:13 +0000 |
commit | a113a7d2eaee6dbb2a76fecb0dd620e24e5f4d6c (patch) | |
tree | 12636a05bcb5ee1b5b218df55175d7b61fea1426 /funcs | |
parent | 88d9d3f1fc8352c7348a7616f2b35e3a99081fb4 (diff) |
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/
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/13@426252 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'funcs')
-rw-r--r-- | funcs/func_cdr.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/funcs/func_cdr.c b/funcs/func_cdr.c index c9fce23d2..2d120bb90 100644 --- a/funcs/func_cdr.c +++ b/funcs/func_cdr.c @@ -540,8 +540,7 @@ static int cdr_prop_write(struct ast_channel *chan, const char *cmd, char *parse 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) { |