diff options
author | Přemysl Janouch <p@janouch.name> | 2018-10-09 08:55:03 +0200 |
---|---|---|
committer | Přemysl Janouch <p@janouch.name> | 2018-10-09 08:55:03 +0200 |
commit | 55a107636733320f6ae84920a171799f102cefe1 (patch) | |
tree | 9889c57c9172363b07f9e691fa63b30a45efcc2e | |
parent | 7c9fb564af4675f63cdf513699d0de4184189d13 (diff) | |
download | ell-55a107636733320f6ae84920a171799f102cefe1.tar.gz ell-55a107636733320f6ae84920a171799f102cefe1.tar.xz ell-55a107636733320f6ae84920a171799f102cefe1.zip |
Fix an apparent memory leak
-rw-r--r-- | ell.c | 5 |
1 files changed, 2 insertions, 3 deletions
@@ -734,9 +734,8 @@ ell_set (struct ell *ell, const char *name, struct ell_v *v) { for (struct ell_v *scope = ell->scopes; scope; scope = scope->next) { if ((place = ell_scope_find (&scope->head, name))) { ell_free_seq ((*place)->head->next); - (*place)->head->next = NULL; - return !v - || ell_check (ell, ((*place)->head->next = ell_clone (v))); + (*place)->head->next = v; + return true; } } |