#define free free_noleak
#include <ccan/tdb2/tdb.c>
+#include <ccan/tdb2/open.c>
#include <ccan/tdb2/free.c>
#include <ccan/tdb2/lock.c>
#include <ccan/tdb2/io.c>
if (setjmp(jmpbuf) != 0) {
/* We're partway through. Simulate our death. */
- close(tdb->fd);
+ close(tdb->file->fd);
forget_locking();
in_transaction = false;