]> git.ipfire.org Git - thirdparty/mdadm.git/blobdiff - Monitor.c
Get the changelog uptodate for recent changes.
[thirdparty/mdadm.git] / Monitor.c
index c94bfd85d6e188d8710c6cc764a12751cfd2cac1..5797870ce2e5e7f1dd7c9c97d7c53174d2e627b7 100644 (file)
--- a/Monitor.c
+++ b/Monitor.c
@@ -385,6 +385,7 @@ int Monitor(mddev_dev_t devlist,
                                                if (fd >=0) close(fd);
                                                free(st->devname);
                                                free(st);
+                                               put_md_name(st->devname);
                                                continue;
                                        }
                                        close(fd);
@@ -518,9 +519,9 @@ static void alert(char *event, char *dev, char *disc, char *mailaddr, char *mail
                        if (mdstat) {
                                char buf[8192];
                                int n;
-                               fprintf(mp, "\nP.S. The /proc/mdstat file current contains the following:\n\n");
+                               fprintf(mp, "\nP.S. The /proc/mdstat file currently contains the following:\n\n");
                                while ( (n=fread(buf, 1, sizeof(buf), mdstat)) > 0)
-                                       fwrite(buf, 1, n, mp);
+                                       n=fwrite(buf, 1, n, mp); /* yes, i don't care about the result */
                                fclose(mdstat);
                        }
                        fclose(mp);