diff --git a/WHATS_NEW_DM b/WHATS_NEW_DM index c6192568c..634ec24a7 100644 --- a/WHATS_NEW_DM +++ b/WHATS_NEW_DM @@ -1,6 +1,7 @@ Version 1.02.70 - =================================== - Validate name and uuid params of dm_tree_add_new_dev_with_udev_flags(). + Add pointer test for dependency check in _add_dev(). + Validate name and uuid params of dm_tree_add_new_dev_with_udev_flags(). Do not crash for dm_report_init() sort_key == NULL and behave like "". Return error for failing allocation in dm_asprintf(). Add missing test for failing allocation in dm_realloc() code. diff --git a/libdm/libdm-deptree.c b/libdm/libdm-deptree.c index 0b16efa2c..dabd72253 100644 --- a/libdm/libdm-deptree.c +++ b/libdm/libdm-deptree.c @@ -1180,7 +1180,7 @@ static struct dm_tree_node *_add_dev(struct dm_tree *dtree, goto out; /* Can't recurse if not a mapped device or there are no dependencies */ - if (!node->info.exists || !deps->count) { + if (!node->info.exists || !deps || !deps->count) { if (!_add_to_bottomlevel(node)) { stack; node = NULL;