[dm-devel] [PATCH] libmultipath/checkers/rbd: fix free in libcheck_init

peng.liang5 at zte.com.cn peng.liang5 at zte.com.cn
Fri Nov 4 07:54:29 UTC 2016


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

There is an incorrect free maybe causing memory leak.

Signed-off-by: PengLiang <peng.liang5 at 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




More information about the dm-devel mailing list