X-Git-Url: http://git.ozlabs.org/?a=blobdiff_plain;f=ccan%2Ftal%2Ftal.c;h=474c0ff045c72f3f03c426851dc3e47ed365e4ba;hb=f243444490e8dcdaa399942b70e72d03005370f7;hp=ff25db19afb8a3b16da50ef254687a85b50cc71e;hpb=dfe59969500a0c4e3b82ce6e7f8227d1a6e7b178;p=ccan diff --git a/ccan/tal/tal.c b/ccan/tal/tal.c index ff25db19..474c0ff0 100644 --- a/ccan/tal/tal.c +++ b/ccan/tal/tal.c @@ -455,6 +455,7 @@ static struct tal_hdr *remove_node(struct tal_hdr *t) /* Are we the only one? */ if (prev == t) { + struct prop_hdr *next = (*prop)->next; struct children *c = group->parent_child; /* Is this the group embedded in the child property? */ if (group == &c->group) { @@ -462,9 +463,9 @@ static struct tal_hdr *remove_node(struct tal_hdr *t) } else { /* Empty group, so free it. */ list_del_from(&c->group.list, &group->list.n); - *prop = group->hdr.next; freefn(group); } + *prop = next; return c->parent; } else { /* Move property to next node. */