From 42870d441d18aa5546e36a84de2c01266db6ec78 Mon Sep 17 00:00:00 2001 From: Alasdair Kergon Date: Fri, 25 Sep 2009 18:19:09 +0000 Subject: [PATCH] ensure dm_strdup succeeds --- libdm/libdm-common.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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; } }