]> granicus.if.org Git - neomutt/commitdiff
Add NULL checks to rfc1524_free_entry()
authorKevin McCarthy <kevin@8t8.us>
Sat, 22 Jun 2019 23:13:46 +0000 (16:13 -0700)
committerRichard Russon <rich@flatcap.org>
Mon, 24 Jun 2019 15:21:35 +0000 (16:21 +0100)
The existing code was fine, but make it robust like other free
functions in mutt, so the behavior isn't surprising.

Co-authored-by: Richard Russon <rich@flatcap.org>
mutt_attach.c

index 8f39805c6c8943ec1a7913d54a4ab1f4cfcc7aa3..76699b38209e8c26f341dae0629f5631377822b6 100644 (file)
@@ -652,8 +652,7 @@ return_error:
     }
   }
 
-  if (entry)
-    rfc1524_free_entry(&entry);
+  rfc1524_free_entry(&entry);
 
   if (mutt_b2s(pagerfile)[0] != '\0')
     mutt_file_unlink(mutt_b2s(pagerfile));