diff options
author | Brian Behlendorf <behlendorf1@llnl.gov> | 2012-09-18 19:33:00 +0000 |
---|---|---|
committer | Brian Behlendorf <behlendorf1@llnl.gov> | 2012-09-18 19:33:37 +0000 |
commit | 0a2f7b3662fd10e7ac56a4b2859248eb98e31d6d (patch) | |
tree | fa2956a0b53e8e3ad69db764885927b8d9114306 | |
parent | 211204bed39a9652c95269cfef13be57d1507b71 (diff) |
Seg fault 'zpool import -d /dev/disk/by-id -a'zfs-0.6.0-rc11
Introduced by commit 44867b6d6effc1628dd00c36821ab044f89fb988.
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
-rw-r--r-- | lib/libzfs/libzfs_import.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/libzfs/libzfs_import.c b/lib/libzfs/libzfs_import.c index c2d87f83049f..b5cac60946c6 100644 --- a/lib/libzfs/libzfs_import.c +++ b/lib/libzfs/libzfs_import.c @@ -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; } } |