diff options
author | Clyne Sullivan <tullivan99@gmail.com> | 2018-04-02 17:32:29 -0400 |
---|---|---|
committer | Clyne Sullivan <tullivan99@gmail.com> | 2018-04-02 17:32:29 -0400 |
commit | 14fd4de5d5f0a4e8e51fc2fc180d5ec4c92fa22c (patch) | |
tree | 22f7ba3a5a9402b1119fb6c6b67c2a4c8e394ed3 /parser.c | |
parent | ecbe199cb823a5017eab8f0f13ce9a91ba61980b (diff) |
memory leak fix
Diffstat (limited to 'parser.c')
-rw-r--r-- | parser.c | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -230,13 +230,13 @@ loop: } else { // move result global variable "ANS" variable *ret = igetvar(it, "ANS"); - ret->type = it->ret->type; - if (ret->type == STRING) { + if (ret->type == STRING) free((void *)ret->value.p); + ret->type = it->ret->type; + if (ret->type == STRING) ret->value.p = (uint32_t)strclone((char *)it->ret->value.p); - } else { + else ret->value.p = it->ret->value.p; - } itryfree(it->ret); it->ret = ret; } |