From 55a107636733320f6ae84920a171799f102cefe1 Mon Sep 17 00:00:00 2001 From: Přemysl Janouch Date: Tue, 9 Oct 2018 08:55:03 +0200 Subject: Fix an apparent memory leak --- ell.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/ell.c b/ell.c index e984649..0895c86 100644 --- a/ell.c +++ b/ell.c @@ -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; } } -- cgit v1.2.3-70-g09d2