From: Tim Woods Date: Mon, 23 Jul 2007 07:15:52 +0000 (+1000) Subject: "--export" segfaults with non-persistent super blocks X-Git-Tag: mdadm-2.6.3~6 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=9bbcc5f7c4140244abc4d427fe107b9d5c33c257;p=thirdparty%2Fmdadm.git "--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. --- diff --git a/Detail.c b/Detail.c index 7e141636..ed100fa1 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; }