talloc: don't allow a talloc_pool inside a talloc_pool.
authorRusty Russell <rusty@rustcorp.com.au>
Tue, 17 Jul 2012 19:24:31 +0000 (04:54 +0930)
committerRusty Russell <rusty@rustcorp.com.au>
Tue, 17 Jul 2012 19:24:31 +0000 (04:54 +0930)
commit4f331872bc783445c709e5fe4846b8687e274953
tree01730b205abad309b3aabc6b466a1992bdefe957
parent8893215aaf714154c190c66bf7d1ce568118ec39
talloc: don't allow a talloc_pool inside a talloc_pool.

We explicitly call free() on a pool which falls to zero, assuming it's
not inside another pool (we crash).  Check on creation and explicitly
document this case.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
lib/talloc/talloc.c
lib/talloc/talloc.h