ast_expr2: Fix off-nominal memory leak.

Thanks to ibercom for pointing out a memory leak that was missed
in the earlier patch for the issue.

ASTERISK-26119
Reported by: Alexei Gradinari

Change-Id: I9a151f5c4725d97fb82a9e938bc73dc659532b71
changes/68/3168/1
Richard Mudgett 9 years ago
parent e0f27ecabb
commit 44f16af7cc

@ -3673,6 +3673,8 @@ op_tildetilde (struct val *a, struct val *b)
vs = malloc(strlen(a->u.s)+strlen(b->u.s)+1);
if (vs == NULL) {
ast_log(LOG_WARNING, "malloc() failed\n");
free_value(a);
free_value(b);
return NULL;
}

@ -1666,6 +1666,8 @@ op_tildetilde (struct val *a, struct val *b)
vs = malloc(strlen(a->u.s)+strlen(b->u.s)+1);
if (vs == NULL) {
ast_log(LOG_WARNING, "malloc() failed\n");
free_value(a);
free_value(b);
return NULL;
}

Loading…
Cancel
Save