diff --git a/sys/geom/label/g_label_ntfs.c b/sys/geom/label/g_label_ntfs.c index a16cca224516..d3722e85a0e1 100644 --- a/sys/geom/label/g_label_ntfs.c +++ b/sys/geom/label/g_label_ntfs.c @@ -74,6 +74,9 @@ g_label_ntfs_taste(struct g_consumer *cp, char *label, size_t size) goto done; filerecp = g_read_data(cp, voloff, recsize, &error); + if (filerecp == NULL) + goto done; + fr = (struct filerec *)filerecp; if(fr->fr_fixup.fh_magic != NTFS_FILEMAGIC){