From 9bbcc5f7c4140244abc4d427fe107b9d5c33c257 Mon Sep 17 00:00:00 2001 From: Tim Woods Date: Mon, 23 Jul 2007 17:15:52 +1000 Subject: "--export" segfaults with non-persistent super blocks From: Tim Woods This patch fixes a NULL pointer dereference in Detail.c when running 'mdadm --detail --export' on a device with non-persistent super blocks. --- Detail.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Detail.c b/Detail.c index 7e14163..ed100fa 100644 --- a/Detail.c +++ b/Detail.c @@ -137,7 +137,8 @@ int Detail(char *dev, int brief, int export, int test, char *homehost) printf("MD_DEVICES=%d\n", array.raid_disks); printf("MD_METADATA=%d.%d\n", array.major_version, array.minor_version); - st->ss->export_super(super); + if (super) + st->ss->export_super(super); goto out; } -- cgit