Commit 10e825b3 10e825b3a9ed4b8bdd7f579565ce117c455ea5ad by Alain Magloire

mbx_unix.c

mailbox_unix_expunge: forget to free tmpmbox filename.
1 parent 9c38b373
......@@ -999,7 +999,11 @@ mailbox_unix_tmpfile (mailbox_t mbox, char *tmpmbox)
}
fp = fdopen(fd, "w+");
if (fp == 0)
{
close(fd);
free (tmpmbox);
tmpmbox = NULL;
}
/* really I should just remove the file here */
/* remove(tmpmbox); */
......@@ -1039,6 +1043,7 @@ mailbox_unix_expunge (mailbox_t mbox)
{
fclose (tmpfile);
remove (tmpmbox);
free (tmpmbox);
return ENOLCK;
}
......@@ -1298,6 +1303,7 @@ mailbox_unix_expunge (mailbox_t mbox)
remove (tmpmbox);
bailout:
free (tmpmbox);
/* Release the locks */
if (oflags > 0)
fcntl (fileno (mud->file), F_SETFL, oflags);
......