Mail: correctly track the number of messages (thanks igor)

We forgot to update the message count when deleting
messages in mail, meaning we could access trailing
messages that had been freed.
This commit is contained in:
Ori Bernstein 2021-04-12 09:22:48 -07:00
parent dc8da7c232
commit fd4e8eef0b

View file

@ -715,6 +715,7 @@ mbflush(char **, int)
else
mbox.mesg[j++] = m;
}
mbox.nmesg = j;
close(fd);
fprint(mbox.ctl, "clean\n");