summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--sys/geom/label/g_label_ntfs.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/sys/geom/label/g_label_ntfs.c b/sys/geom/label/g_label_ntfs.c
index a16cca2..d3722e8 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){
OpenPOWER on IntegriCloud