tdb2: test: fix run-57-die-during-transaction.c to be more efficient.
authorRusty Russell <rusty@rustcorp.com.au>
Tue, 13 Sep 2011 22:43:26 +0000 (08:13 +0930)
committerRusty Russell <rusty@rustcorp.com.au>
Tue, 13 Sep 2011 22:43:26 +0000 (08:13 +0930)
commit5fac36f5adcc3bd483fa5b4e068db3c1174e8a4a
treeeb6b2eb5e02d217e2095c30c282d62e4c1cd7c1d
parent1cb92ea9cf3efcc5f4295b7aeb8ddd10e174127c
tdb2: test: fix run-57-die-during-transaction.c to be more efficient.

We track malloc and free, but we didn't catch the free() inside
external_agent, which means that our list of allocations keeps
growing.  Particularly under valgrind, which re-uses memory less than
the glibc allocator.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
(Imported from CCAN commit d9cbd7d4454ae35e4e2f6d18a9469bf26948e4b9)
lib/tdb2/test/external-agent.c
lib/tdb2/test/external-agent.h
lib/tdb2/test/run-57-die-during-transaction.c