From: Rusty Russell Date: Tue, 1 Mar 2011 12:49:20 +0000 (+1030) Subject: tdb2: close memory leak in tdb_check() X-Git-Url: https://git.ozlabs.org/?p=ccan;a=commitdiff_plain;h=71c1a95f1a9d2e33f3e37b287f9f8118ee01bf7f;ds=sidebyside tdb2: close memory leak in tdb_check() --- 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;