From 784cb716b1aa15e615ee4814574e6ed03377a8d8 Mon Sep 17 00:00:00 2001 From: Igor Bazhitov Date: Sat, 9 Oct 2010 22:54:31 +0400 Subject: [PATCH] libblkid: fix memory leak search_type and search_handle fields of blkid_dev_iterate iterator are not being freed after usage. Add cleanup code. Signed-off-by: Igor Bazhitov --- shlibs/blkid/src/dev.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/shlibs/blkid/src/dev.c b/shlibs/blkid/src/dev.c index 24d989dd..791a6c18 100644 --- a/shlibs/blkid/src/dev.c +++ b/shlibs/blkid/src/dev.c @@ -193,6 +193,8 @@ extern void blkid_dev_iterate_end(blkid_dev_iterate iter) if (!iter || iter->magic != DEV_ITERATE_MAGIC) return; iter->magic = 0; + free(iter->search_type); + free(iter->search_value); free(iter); } -- 2.39.5