summaryrefslogtreecommitdiff
path: root/main/ast_expr2.y
diff options
context:
space:
mode:
authorRichard Mudgett <rmudgett@digium.com>2016-07-11 13:42:55 -0500
committerRichard Mudgett <rmudgett@digium.com>2016-07-11 13:51:29 -0500
commit44f16af7cc9a6bc5203106a81b595997cb31c4fd (patch)
tree93ab27d37de206597ad830269872c59b9f7a408a /main/ast_expr2.y
parente0f27ecabb2ff766ea4ec7bdd77fccab2fe826c4 (diff)
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
Diffstat (limited to 'main/ast_expr2.y')
-rw-r--r--main/ast_expr2.y2
1 files changed, 2 insertions, 0 deletions
diff --git a/main/ast_expr2.y b/main/ast_expr2.y
index 29fee35cf..8b32b2b9c 100644
--- a/main/ast_expr2.y
+++ b/main/ast_expr2.y
@@ -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;
}