From 71c1a95f1a9d2e33f3e37b287f9f8118ee01bf7f Mon Sep 17 00:00:00 2001 From: Rusty Russell Date: Tue, 1 Mar 2011 23:19:20 +1030 Subject: [PATCH] tdb2: close memory leak in tdb_check() --- ccan/tdb2/check.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/ccan/tdb2/check.c b/ccan/tdb2/check.c index 4da81dbb..df61184f 100644 --- a/ccan/tdb2/check.c +++ b/ccan/tdb2/check.c @@ -700,9 +700,13 @@ int tdb_check(struct tdb_context *tdb, tdb_allrecord_unlock(tdb, F_RDLCK); tdb_unlock_expand(tdb, F_RDLCK); + free(fr); + free(used); return 0; fail: + free(fr); + free(used); tdb_allrecord_unlock(tdb, F_RDLCK); tdb_unlock_expand(tdb, F_RDLCK); return -1; -- 2.39.2