| Fix mdconfig(8) segmentation fault. |
| |
| diff -ru --exclude-from freebsd-src-diff-exclude-names /usr/src/sbin/mdconfig/mdconfig.c freebsd-11.1/usr/src/sbin/mdconfig/mdconfig.c |
| --- /usr/src/sbin/mdconfig/mdconfig.c 2017-07-21 07:43:26.000000000 +0800 |
| +++ freebsd-11.1/usr/src/sbin/mdconfig/mdconfig.c 2019-03-22 16:10:16.587537000 +0800 |
| @@ -452,7 +452,7 @@ |
| } |
| gc = &pp->lg_config; |
| type = geom_config_get(gc, "type"); |
| - if (strcmp(type, "vnode") == 0) { |
| + if (type && strcmp(type, "vnode") == 0) { |
| file = geom_config_get(gc, "file"); |
| if (fflag != NULL && |
| strcmp(fflag, file) != 0) |