tal: don't access freed memory on unusual case of redundant tal_free() in destructor.
authorRusty Russell <rusty@rustcorp.com.au>
Thu, 1 Mar 2018 06:25:51 +0000 (16:55 +1030)
committerRusty Russell <rusty@rustcorp.com.au>
Thu, 1 Mar 2018 06:25:51 +0000 (16:55 +1030)
commit41a0af50bf7e9cee7ad5ffdd288647ea2c3a6c38
tree6a59fdbc854a17ca0b8800f779c55ac169894279
parent09bb99b92546f3e8be6bb0f9218924b8491be461
tal: don't access freed memory on unusual case of redundant tal_free() in destructor.

We already handle normal free traversal loops, just not ones caused by a
direct tal_free() call, such a calling tal_free() on one's own parent.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
ccan/tal/tal.c