From: Konrad Rzeszutek Date: Wed, 17 Dec 2008 22:24:40 +0000 (+0100) Subject: [lib] Memory leak when deleting and re-adding device-mapper entries. X-Git-Tag: 0.4.9~152 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=72496b96b660f4fd296127633132b009706f180f;p=platform%2Fupstream%2Fmultipath-tools.git [lib] Memory leak when deleting and re-adding device-mapper entries. If we remove a map (with configuration details specified in the multipath.conf file) and later re-add it, the pointer to the config is over-written without first de-allocating the values. --- diff --git a/libmultipath/configure.c b/libmultipath/configure.c index 285a8a2..83ee0ae 100644 --- a/libmultipath/configure.c +++ b/libmultipath/configure.c @@ -50,6 +50,11 @@ setup_map (struct multipath * mpp) } /* + * free features, selector, and hwhandler properties if they are being reused + */ + free_multipath_attributes(mpp); + + /* * properties selectors */ select_pgfailback(mpp);