diff --git a/WHATS_NEW_DM b/WHATS_NEW_DM index 795776b57..5e9228ad9 100644 --- a/WHATS_NEW_DM +++ b/WHATS_NEW_DM @@ -1,5 +1,6 @@ Version 1.02.111 - ==================================== + Add missing check for allocation inside dm_split_lvm_name(). Test dm_task_get_message_response for !NULL in dm_stats_print_region(). Add checks for failing dm_stats_create() in dmsetup. Add missing fifo close when failed to initialize client connection. diff --git a/libdm/libdm-string.c b/libdm/libdm-string.c index 587abfe34..913283283 100644 --- a/libdm/libdm-string.c +++ b/libdm/libdm-string.c @@ -95,8 +95,10 @@ static char *_unquote(char *component) int dm_split_lvm_name(struct dm_pool *mem, const char *dmname, char **vgname, char **lvname, char **layer) { - if (mem) - *vgname = dm_pool_strdup(mem, dmname); + if (mem && !(*vgname = dm_pool_strdup(mem, dmname))) { + log_error("Failed to duplicate dmname."); + return 0; + } if (!*vgname) return 0;