git://git.camperquake.de
/
zfs.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
211204b
)
Seg fault 'zpool import -d /dev/disk/by-id -a'
author
Brian Behlendorf
<behlendorf1@llnl.gov>
Tue, 18 Sep 2012 19:33:00 +0000
(12:33 -0700)
committer
Brian Behlendorf
<behlendorf1@llnl.gov>
Tue, 18 Sep 2012 19:33:37 +0000
(12:33 -0700)
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
lib/libzfs/libzfs_import.c
patch
|
blob
|
history
diff --git
a/lib/libzfs/libzfs_import.c
b/lib/libzfs/libzfs_import.c
index
c2d87f8
..
b5cac60
100644
(file)
--- 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;
}
}