From: Igor Bazhitov Date: Sat, 9 Oct 2010 18:54:31 +0000 (+0400) Subject: libblkid: fix memory leak X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=784cb716b1aa15e615ee4814574e6ed03377a8d8;p=util-linux 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 --- 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); }