mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2024-12-25 18:59:33 +03:00
Seg fault 'zpool import -d /dev/disk/by-id -a'
Introduced by commit 44867b6d6e
.
We should of course check to ensure best isn't NULL before
attempting to dereference it.
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Closes #974
This commit is contained in:
parent
211204bed3
commit
0a2f7b3662
@ -173,7 +173,7 @@ fix_paths(nvlist_t *nv, name_entry_t *names)
|
||||
break;
|
||||
}
|
||||
|
||||
if (ne->ne_order < best->ne_order || best == NULL)
|
||||
if (best == NULL || ne->ne_order < best->ne_order)
|
||||
best = ne;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user