Commit a2083afe authored by Rusty Russell's avatar Rusty Russell

tdb2: fix leak on lock failure during open.

parent 0a05a808
......@@ -397,6 +397,7 @@ struct tdb_context *tdb_open(const char *name, int tdb_flags,
} else
tdb_munmap(tdb);
}
free(tdb->lockrecs);
free((char *)tdb->name);
if (tdb->fd != -1)
if (close(tdb->fd) != 0)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment