mirror of
git://sourceware.org/git/lvm2.git
synced 2024-12-21 13:34:40 +03:00
Check for deps pointer before dererence
As _deps() call may return NULL - check for it.
This commit is contained in:
parent
3b5834d78b
commit
4d95ccc696
@ -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.
|
||||
|
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user