diff --git a/device_mapper/libdm-config.c b/device_mapper/libdm-config.c index b57a6de7d..de614616a 100644 --- a/device_mapper/libdm-config.c +++ b/device_mapper/libdm-config.c @@ -1418,7 +1418,8 @@ static struct dm_config_value *_clone_config_value(struct dm_pool *mem, if (v->type == DM_CFG_STRING) { if (!(new_cv = _create_str_value(mem, v->v.str, strlen(v->v.str)))) { - + log_error("Failed to clone string config value."); + return NULL; } } else { if (!(new_cv = _create_value(mem))) { diff --git a/libdm/libdm-config.c b/libdm/libdm-config.c index 682d2b00d..c75e447cb 100644 --- a/libdm/libdm-config.c +++ b/libdm/libdm-config.c @@ -1418,7 +1418,8 @@ static struct dm_config_value *_clone_config_value(struct dm_pool *mem, if (v->type == DM_CFG_STRING) { if (!(new_cv = _create_str_value(mem, v->v.str, strlen(v->v.str)))) { - + log_error("Failed to clone string config value."); + return NULL; } } else { if (!(new_cv = _create_value(mem))) {