diff --git a/libdm/libdm-common.c b/libdm/libdm-common.c index db814eff7..c985ad785 100644 --- a/libdm/libdm-common.c +++ b/libdm/libdm-common.c @@ -217,7 +217,9 @@ static char *_find_dm_name_of_device(dev_t st_rdev) continue; if (buf.st_rdev == st_rdev) { - new_name = dm_strdup(name); + if (!(new_name = dm_strdup(name))) + log_error("dm_task_set_name: strdup(%s) failed", + name); break; } }