diff options
author | Rusty Russell <rusty@rustcorp.com.au> | 2011-09-14 08:13:26 +0930 |
---|---|---|
committer | Rusty Russell <rusty@rustcorp.com.au> | 2011-09-14 08:13:26 +0930 |
commit | 5fac36f5adcc3bd483fa5b4e068db3c1174e8a4a (patch) | |
tree | eb6b2eb5e02d217e2095c30c282d62e4c1cd7c1d /lib/tdb2/test/external-agent.h | |
parent | 1cb92ea9cf3efcc5f4295b7aeb8ddd10e174127c (diff) | |
download | samba-5fac36f5adcc3bd483fa5b4e068db3c1174e8a4a.tar.gz samba-5fac36f5adcc3bd483fa5b4e068db3c1174e8a4a.tar.bz2 samba-5fac36f5adcc3bd483fa5b4e068db3c1174e8a4a.zip |
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)
Diffstat (limited to 'lib/tdb2/test/external-agent.h')
-rw-r--r-- | lib/tdb2/test/external-agent.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/tdb2/test/external-agent.h b/lib/tdb2/test/external-agent.h index 9eada10750..cf9789b669 100644 --- a/lib/tdb2/test/external-agent.h +++ b/lib/tdb2/test/external-agent.h @@ -35,6 +35,9 @@ enum agent_return external_agent_operation(struct agent *handle, enum operation op, const char *name); +/* Hook into free() on tdb_data in external agent. */ +void (*external_agent_free)(void *); + /* Mapping enum -> string. */ const char *agent_return_name(enum agent_return ret); const char *operation_name(enum operation op); |