summaryrefslogtreecommitdiff
path: root/Monitor.c
diff options
context:
space:
mode:
authorDimitri John Ledkov <xnox@ubuntu.com>2017-05-12 12:32:07 +0100
committerDimitri John Ledkov <xnox@ubuntu.com>2017-05-12 12:32:07 +0100
commit77b19ed5f259bc62680acf2b1a3454baa2472bc5 (patch)
tree7441d8d057c09e54c8ea23c984f2ccdf22c98649 /Monitor.c
parentca114f3c76374493f0fd64f8ea0a9b96ae9b1dc5 (diff)
New upstream release.
Diffstat (limited to 'Monitor.c')
-rw-r--r--Monitor.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/Monitor.c b/Monitor.c
index f19c2e5..802a9d9 100644
--- a/Monitor.c
+++ b/Monitor.c
@@ -33,7 +33,7 @@
struct state {
char *devname;
char devnm[32]; /* to sync with mdstat info */
- long utime;
+ unsigned int utime;
int err;
char *spare_group;
int active, working, failed, spare, raid;
@@ -213,6 +213,8 @@ int Monitor(struct mddev_dev *devlist,
if (mdstat)
free_mdstat(mdstat);
mdstat = mdstat_read(oneshot?0:1, 0);
+ if (!mdstat)
+ mdstat_close();
for (st=statelist; st; st=st->next)
if (check_array(st, mdstat, c->test, &info,
@@ -597,7 +599,7 @@ static int check_array(struct state *st, struct mdstat_ent *mdstat,
} else
alert("RebuildFinished", dev, NULL, ainfo);
if (sra)
- free(sra);
+ sysfs_free(sra);
}
st->percent = mse->percent;