diff options
author | Tim Woods <timwoods@uklinux.net> | 2007-07-23 17:15:52 +1000 |
---|---|---|
committer | Neil Brown <neilb@suse.de> | 2007-07-23 17:15:52 +1000 |
commit | 9bbcc5f7c4140244abc4d427fe107b9d5c33c257 (patch) | |
tree | 23d11f4b85266cfa3cfc38f46765b0d1b0547354 /Detail.c | |
parent | 962a108fb7d709c4f056aeecc775d39fa9dcf328 (diff) | |
download | mdadm-9bbcc5f7c4140244abc4d427fe107b9d5c33c257.tar.gz mdadm-9bbcc5f7c4140244abc4d427fe107b9d5c33c257.tar.xz mdadm-9bbcc5f7c4140244abc4d427fe107b9d5c33c257.zip |
"--export" segfaults with non-persistent super blocks
From: Tim Woods <timwoods@uklinux.net>
This patch fixes a NULL pointer dereference in Detail.c when running
'mdadm --detail --export' on a device with non-persistent super blocks.
Diffstat (limited to 'Detail.c')
-rw-r--r-- | Detail.c | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -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; } |