In dm_mapname, dm_task_get_name(dmt) has been called and the return value has been stored in map. Use map instead of second dm_task_get_name. Signed-off-by: Lixiaokeng <lixiaokeng@xxxxxxxxxx> Signed-off-by: Zhiqiang Liu <liuzhiqiang26@xxxxxxxxxx> Signed-off-by: Linfeilong <linfeilong@xxxxxxxxxx> --- libmultipath/devmapper.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libmultipath/devmapper.c b/libmultipath/devmapper.c index cc2de1df..b4d77cb6 100644 --- a/libmultipath/devmapper.c +++ b/libmultipath/devmapper.c @@ -1315,7 +1315,7 @@ dm_mapname(int major, int minor) map = dm_task_get_name(dmt); if (map && strlen(map)) - response = STRDUP((const char *)dm_task_get_name(dmt)); + response = STRDUP((const char *)map); dm_task_destroy(dmt); return response; -- -- dm-devel mailing list dm-devel@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/dm-devel