mirror of
git://sourceware.org/git/lvm2.git
synced 2024-12-22 17:35:59 +03:00
Check for deps pointer before dererence
As _deps() call may return NULL - check for it.
This commit is contained in:
parent
9fde529762
commit
c559180cca
@ -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