[dm-devel] [PATCH] libmultipath: fix missing dm_task_destroy() in dm_reassign()

zhou.guichun at zte.com.cn zhou.guichun at zte.com.cn
Mon Nov 7 02:01:17 UTC 2016


From: "zhou.guichun" <zhou.guichun at zte.com.cn>

dm_task should be destoryed before going out of dm_reassign()

Signed-off-by: zhou.guichun <zhou.guichun at zte.com.cn>
---
 libmultipath/devmapper.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/libmultipath/devmapper.c b/libmultipath/devmapper.c
index 5aea5b6..e9d13b6 100644
--- a/libmultipath/devmapper.c
+++ b/libmultipath/devmapper.c
@@ -1582,10 +1582,9 @@ int dm_reassign(const char *mapname)
 		sysfs_check_holders(dm_dep, dev_t);
 	}
 
-	dm_task_destroy (dmt);
-
 	r = 1;
 out:
+	dm_task_destroy (dmt);
 	return r;
 }
 
-- 
2.8.1.windows.1




More information about the dm-devel mailing list