dm-devel.redhat.com archive mirror
 help / color / mirror / Atom feed
* [PATCH] libmultipath/checkers/rbd: fix free in libcheck_init
@ 2016-11-04  7:54 peng.liang5
  2016-11-04 17:50 ` Benjamin Marzinski
  0 siblings, 1 reply; 2+ messages in thread
From: peng.liang5 @ 2016-11-04  7:54 UTC (permalink / raw)
  To: Christophe Varoqui; +Cc: zhang.kai16, PengLiang, dm-devel

From: PengLiang <peng.liang5@zte.com.cn>

There is an incorrect free maybe causing memory leak.

Signed-off-by: PengLiang <peng.liang5@zte.com.cn>
---
 libmultipath/checkers/rbd.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libmultipath/checkers/rbd.c b/libmultipath/checkers/rbd.c
index 481d860..9ea0572 100644
--- a/libmultipath/checkers/rbd.c
+++ b/libmultipath/checkers/rbd.c
@@ -174,7 +174,7 @@ int libcheck_init(struct checker * c)
 
 	ct->image = strdup(image);
 	if (!ct->image)
-		goto free_info;
+		goto free_username;
 
 	pool = udev_device_get_sysattr_value(bus_dev, "pool");
 	if (!pool)
-- 
2.8.1.windows.1

^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2016-11-04 17:50 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-11-04  7:54 [PATCH] libmultipath/checkers/rbd: fix free in libcheck_init peng.liang5
2016-11-04 17:50 ` Benjamin Marzinski

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).