diff options
Diffstat (limited to 'main/ast_expr2.y')
-rw-r--r-- | main/ast_expr2.y | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/main/ast_expr2.y b/main/ast_expr2.y index bf1237a53..83d3effe3 100644 --- a/main/ast_expr2.y +++ b/main/ast_expr2.y @@ -532,6 +532,9 @@ make_str (const char *s) vp = (struct val *) malloc (sizeof (*vp)); if (vp == NULL || ((vp->u.s = strdup (s)) == NULL)) { + if (vp) { + free(vp); + } ast_log(LOG_WARNING,"malloc() failed\n"); return(NULL); } |