summaryrefslogtreecommitdiffstats
path: root/shlibs/blkid
diff options
context:
space:
mode:
Diffstat (limited to 'shlibs/blkid')
-rw-r--r--shlibs/blkid/src/superblocks/drbd.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/shlibs/blkid/src/superblocks/drbd.c b/shlibs/blkid/src/superblocks/drbd.c
index e0bbb4d66..a56486e97 100644
--- a/shlibs/blkid/src/superblocks/drbd.c
+++ b/shlibs/blkid/src/superblocks/drbd.c
@@ -78,7 +78,8 @@ static int probe_drbd(blkid_probe pr, const struct blkid_idmag *mag)
blkid_probe_get_buffer(pr,
off,
sizeof(struct md_on_disk_08));
-
+ if (!md)
+ return -1;
if (be32_to_cpu(md->magic) != DRBD_MD_MAGIC_08)
return -1;