summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Monitor.c2
-rw-r--r--mapfile.c1
-rw-r--r--mdadm.c2
3 files changed, 4 insertions, 1 deletions
diff --git a/Monitor.c b/Monitor.c
index abc2dbd6..2f0fe0cc 100644
--- a/Monitor.c
+++ b/Monitor.c
@@ -619,7 +619,7 @@ int Wait(char *dev)
free_mdstat(ms);
return rv;
}
- free(ms);
+ free_mdstat(ms);
rv = 0;
mdstat_wait(5);
}
diff --git a/mapfile.c b/mapfile.c
index 0d0aa398..59cc6c6d 100644
--- a/mapfile.c
+++ b/mapfile.c
@@ -245,6 +245,7 @@ void RebuildMap(void)
break;
}
}
+ free_mdstat(mdstat);
map_write(map);
map_free(map);
}
diff --git a/mdadm.c b/mdadm.c
index d680ea78..6609bf22 100644
--- a/mdadm.c
+++ b/mdadm.c
@@ -1217,6 +1217,7 @@ int main(int argc, char *argv[])
export, test, homehost);
put_md_name(name);
}
+ free_mdstat(ms);
} else if (devmode == 'S' && scan) {
/* apply --stop to all devices in /proc/mdstat */
/* Due to possible stacking of devices, repeat until
@@ -1249,6 +1250,7 @@ int main(int argc, char *argv[])
put_md_name(name);
}
+ free_mdstat(ms);
} while (!last && err);
if (err) rv |= 1;
} else {