mirror of
https://github.com/opnsense/src.git
synced 2026-05-28 04:12:45 -04:00
Make mdconfig(8) not segfault when the kernel returns garbage data.
MFC after: 2 weeks Sponsored by: DARPA, AFRL
This commit is contained in:
parent
316e092a77
commit
30545786bb
1 changed files with 2 additions and 2 deletions
|
|
@ -452,8 +452,8 @@ md_list(const char *units, int opt, const char *fflag)
|
|||
}
|
||||
gc = &pp->lg_config;
|
||||
type = geom_config_get(gc, "type");
|
||||
if (strcmp(type, "vnode") == 0 ||
|
||||
strcmp(type, "preload") == 0) {
|
||||
if (type != NULL && (strcmp(type, "vnode") == 0 ||
|
||||
strcmp(type, "preload") == 0)) {
|
||||
file = geom_config_get(gc, "file");
|
||||
if (fflag != NULL &&
|
||||
strcmp(fflag, file) != 0)
|
||||
|
|
|
|||
Loading…
Reference in a new issue