TT#63546 fix app_voicemail pcre_malloc and vmu pointers

* pcre_malloc() is changed to ast_malloc() as ast_free()
      is used to free up the memory block
    * struct vm_state when used now sets pointers to NULL

Change-Id: Ibd65790f7b34e19a4145c86f63b89e2568ea95a3
changes/15/32015/2
Kirill Solomko 7 years ago
parent c3cdfc58e6
commit 5d2df350ee

@ -22,3 +22,4 @@ sipwise_fix_chan_usage.patch
sipwise_vm_store_message_add_diag_info.patch
sipwise_vm_fix_envelope_play.patch
sipwise_vm_asterisk_16_support.patch
sipwise_vm_pointers_malloc.patch

@ -0,0 +1,20 @@
--- a/apps/app_voicemail.c
+++ b/apps/app_voicemail.c
@@ -1365,7 +1365,7 @@ static char *edit(const char *str, int l
slen = len;
len -= mvec[1] - mvec[0];
len += rlen = findreplen(rep, nmat, replen);
- cp = res = pcre_malloc(len + 1);
+ cp = res = ast_malloc(len + 1);
if (mvec[0] > 0) {
strncpy(cp, str, mvec[0]);
cp += mvec[0];
@@ -12130,6 +12130,8 @@ static int vm_execmain(struct ast_channe
/* Add the vm_state to the active list and keep it active */
vms.lastmsg = -1;
+ vms.deleted = NULL;
+ vms.heard = NULL;
ast_test_suite_event_notify("START", "Message: vm_execmain started");
if (ast_channel_state(chan) != AST_STATE_UP) {
Loading…
Cancel
Save