libmultipath: free allocated value in set_int
Benjamin Marzinski
maintainerPATCH 1/2 libmultipath: free allocated value in set_int
set_int() needs to free the buffer it got back from set_value()
Fixes 8f9ac30d ("libmultipath: fix set_int error path")
Signed-off-by Benjamin Marzinski <[email protected]>
--- libmultipath/dict.c | 1 + 1 file changed, 1 insertion(+)
libmultipath/dict.c +1 -0
@@ -39,6 +39,7 @@ set_int(vector strvec, void *ptr) *int_ptr =atoi (buff); +FREE (buff);return 0 ; }
Signature · 1 line
2.7.4
Benjamin Marzinski
maintainerPATCH 2/2 kpartx: fix new memory leak in dm_find_part
While commit 960bb238 fixed one memory leak, it created another.
Fixes 960bb238 ("kpartx: Fix memory leak of uuid found by coverity")
Signed-off-by Benjamin Marzinski <[email protected]>
--- kpartx/devmapper.c | 1 + 1 file changed, 1 insertion(+)
kpartx/devmapper.c +1 -0
@@ -690,6 +690,7 @@ int dm_find_part(const char *parent, const char *delim, int part, r =dm_rename (tmp, name);if (r ==1 ) { +free (tmp); *part_uuid = uuid;return 1 ; }
Signature · 1 line
2.7.4
Re: [PATCH 2/2] kpartx: fix new memory leak in dm_find_part
Quoted 4 lines · Benjamin Marzinski
While commit
960bb238fixed one memory leak, it created another.Fixes 960bb238 ("kpartx: Fix memory leak of uuid found by coverity")Signed-off-by Benjamin Marzinski <[email protected]>
Reviewed-by Martin Wilck <[email protected]>
Quoted 17 lines
--- kpartx/devmapper.c | 1 + 1 file changed, 1 insertion(+)kpartx/devmapper.c +1
-0@@ -690,6 +690,7 @@ int dm_find_part(const char *parent, const char *delim, int part, r =dm_rename (tmp, name);if (r ==1 ) { +free (tmp); *part_uuid = uuid;return 1 ;}
Signature · 9 lines
Dr. Martin Wilck <[email protected]>, Tel. +49 (0)911 74053 2107 SUSE Linux GmbH, GF: Felix Imendörffer, Jane Smithard, Graham Norton HRB 21284 (AG Nürnberg) -- dm-devel mailing list [email protected] https://www.redhat.com/mailman/listinfo/dm-devel
Quoted 4 lines · Benjamin Marzinski
set_int()needs to free the buffer it got back fromset_value()Fixes 8f9ac30d ("libmultipath: fix set_int error path")Signed-off-by Benjamin Marzinski <[email protected]>
Reviewed-by Martin Wilck <[email protected]>
Signature · 9 lines
Dr. Martin Wilck <[email protected]>, Tel. +49 (0)911 74053 2107 SUSE Linux GmbH, GF: Felix Imendörffer, Jane Smithard, Graham Norton HRB 21284 (AG Nürnberg) -- dm-devel mailing list [email protected] https://www.redhat.com/mailman/listinfo/dm-devel