+2009-04-06 22:05 +0200 Rocco Rutte <pdmef@gmx.net> (d639baaf57fb)
+
+ * doc/manual.xml.head: Manual: Fix typo
+
+2009-04-06 19:10 +0200 Erik Hovland <erik@hovland.org> (4fe35e9984ba)
+
+ * ChangeLog, sendlib.c: mutt_message_to_7bit(): Only close file
+ pointer if we opened it
+
+ The pointer is to be managed outside the function and provided. Only
+ close it we opened it ourself using fopen().
+
2009-04-06 19:07 +0200 Erik Hovland <erik@hovland.org> (b5cbd0dab863)
* sendlib.c: Plug memory leaks in sendlib.c
}
unlink (msg);
- if (SendmailWait >= 0 && tempfile)
+ if (SendmailWait >= 0 && tempfile && *tempfile)
{
/* *tempfile will be opened as stdout */
if (open (*tempfile, O_WRONLY | O_APPEND | O_CREAT | O_EXCL, 0600) < 0)
if (waitpid (pid, &st, 0) > 0)
{
st = WIFEXITED (st) ? WEXITSTATUS (st) : S_ERR;
- if (SendmailWait && st == (0xff & EX_OK) && tempfile)
+ if (SendmailWait && st == (0xff & EX_OK) && tempfile && *tempfile)
{
unlink (*tempfile); /* no longer needed */
FREE (tempfile); /* __FREE_CHECKED__ */
{
st = (SendmailWait > 0 && errno == EINTR && SigAlrm) ?
S_BKG : S_ERR;
- if (SendmailWait > 0 && tempfile)
+ if (SendmailWait > 0 && tempfile && *tempfile)
{
unlink (*tempfile);
FREE (tempfile); /* __FREE_CHECKED__ */
alarm (0);
sigaction (SIGALRM, &oldalrm, NULL);
- if (kill (ppid, 0) == -1 && errno == ESRCH && tempfile)
+ if (kill (ppid, 0) == -1 && errno == ESRCH && tempfile && *tempfile)
{
/* the parent is already dead */
unlink (*tempfile);