From: Lukas Krickl Date: Tue, 5 Dec 2023 14:15:32 +0000 (+0100) Subject: Fixed leak issue with string expressions X-Git-Url: https://git.krickl.dev/?a=commitdiff_plain;h=cf681092261bc840941fea809aa75774501c2c1a;p=ulas%2F.git Fixed leak issue with string expressions --- diff --git a/src/ulas.c b/src/ulas.c index 6848ae2..44938ec 100644 --- a/src/ulas.c +++ b/src/ulas.c @@ -1217,7 +1217,6 @@ void ulas_symbufclear(struct ulas_symbuf *sb) { for (long i = 0; i < sb->len; i++) { struct ulas_sym *s = &sb->buf[i]; free(s->name); - ulas_tokfree(&s->tok); } sb->len = 0; } @@ -2128,7 +2127,7 @@ int ulas_asmdirset(const char **line, unsigned long n, enum ulas_type t) { } break; case ULAS_STR: - val.strv = strdup(ulas_strexpr(line, n, &rc)); + val.strv = ulas_strexpr(line, n, &rc); if (rc == -1) { goto fail; }