diff options
author | Neil Brown <neilb@suse.de> | 2008-07-12 20:27:33 +1000 |
---|---|---|
committer | Neil Brown <neilb@suse.de> | 2008-07-12 20:27:33 +1000 |
commit | 904c1ef77bcb3e3b151f544acf104cd36acdc5f6 (patch) | |
tree | f9c664916c57e355ab57e2ab98c42664a4e4177a /super-ddf.c | |
parent | d024b0a7eb520d5d7f2238b31c18eabe3775e731 (diff) | |
download | mdadm-904c1ef77bcb3e3b151f544acf104cd36acdc5f6.tar.gz mdadm-904c1ef77bcb3e3b151f544acf104cd36acdc5f6.tar.xz mdadm-904c1ef77bcb3e3b151f544acf104cd36acdc5f6.zip |
Fix freeing of updates that have been handled by monitor.
Yes, we do want to free the buf, and the space too if it is still
there.
Diffstat (limited to 'super-ddf.c')
-rw-r--r-- | super-ddf.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/super-ddf.c b/super-ddf.c index acfb491..339db9f 100644 --- a/super-ddf.c +++ b/super-ddf.c @@ -3045,8 +3045,8 @@ static struct mdinfo *ddf_activate_spare(struct active_array *a, * Create a metadata_update record to update the * phys_refnum and lba_offset values */ - mu = malloc(sizeof(*mu) + ddf->conf_rec_len * 512); - mu->buf = (char*)(mu+1); + mu = malloc(sizeof(*mu)); + mu->buf = malloc(ddf->conf_rec_len * 512); mu->space = malloc(sizeof(struct vcl)); mu->len = ddf->conf_rec_len; mu->next = *updates; |