The existing code was fine, but make it robust like other free
functions in mutt, so the behavior isn't surprising.
return_error:
- if (entry)
- rfc1524_free_entry (&entry);
+ rfc1524_free_entry (&entry);
if (fp && (mutt_b2s (tempfile))[0])
mutt_unlink (mutt_b2s (tempfile));
else if (unlink_tempfile)
void rfc1524_free_entry(rfc1524_entry **entry)
{
- rfc1524_entry *p = *entry;
+ rfc1524_entry *p;
+ if (!entry || !*entry)
+ return;
+
+ p = *entry;
FREE (&p->command);
FREE (&p->testcommand);
FREE (&p->composecommand);