From: Jes Sorensen <Jes.Sorensen@xxxxxxxxxx> Signed-off-by: Jes Sorensen <Jes.Sorensen@xxxxxxxxxx> --- Monitor.c | 6 ++++++ 1 files changed, 6 insertions(+), 0 deletions(-) diff --git a/Monitor.c b/Monitor.c index 101bca4..fc0488b 100644 --- a/Monitor.c +++ b/Monitor.c @@ -124,6 +124,7 @@ int Monitor(struct mddev_dev *devlist, */ struct state *statelist = NULL; + struct state *st2; int finished = 0; struct mdstat_ent *mdstat = NULL; char *mailfrom = NULL; @@ -242,6 +243,11 @@ int Monitor(struct mddev_dev *devlist, } test = 0; } + for (st2 = statelist; st2; st2 = statelist) { + statelist = st2->next; + free(st2); + } + if (pidfile) unlink(pidfile); return 0; -- 1.7.6.4 -- To unsubscribe from this list: send the line "unsubscribe linux-raid" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html