diff options
author | Russell Bryant <russell@russellbryant.com> | 2011-05-05 22:02:31 +0000 |
---|---|---|
committer | Russell Bryant <russell@russellbryant.com> | 2011-05-05 22:02:31 +0000 |
commit | 0ea3d219293997a037930d7ea567ed2b5c6c90bb (patch) | |
tree | 1942f150b00baa721ddf08e6a6c25c7e8b49c4f7 /apps/app_rpt.c | |
parent | 19b45ad446b909d553083eb7c2a3a082fe751e6a (diff) |
Merged revisions 317427 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8
........
r317427 | russell | 2011-05-05 16:58:45 -0500 (Thu, 05 May 2011) | 7 lines
Fix potential memory leak, and use of uninitialized memory.
(closes issue #16476)
Reported by: junky
Patches:
M16476.diff uploaded by junky (license 177)
........
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@317428 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'apps/app_rpt.c')
-rw-r--r-- | apps/app_rpt.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/apps/app_rpt.c b/apps/app_rpt.c index 88997936c..990f05423 100644 --- a/apps/app_rpt.c +++ b/apps/app_rpt.c @@ -1975,7 +1975,11 @@ unsigned int seq; return; } n = finddelim(astr,astrs,100); - if (n < 1) return; + if (n < 1) { + ast_free(str); + ast_free(astr); + return; + } ast_mutex_lock(&myrpt->statpost_lock); seq = ++myrpt->statpost_seqno; ast_mutex_unlock(&myrpt->statpost_lock); @@ -12218,7 +12222,7 @@ struct ast_format_cap *cap = NULL; // ctcss code autopatch initiate if (strstr((char *)f->data.ptr,"/M/")&& !myrpt->macropatch) { - char value[16]; + char value[16] = ""; strcat(value,"*6"); myrpt->macropatch=1; rpt_mutex_lock(&myrpt->lock); |