]> granicus.if.org Git - mutt/commitdiff
Harden mutt_free_header() against NULL pointers.
authorThomas Roessler <roessler@does-not-exist.org>
Fri, 16 Oct 1998 12:09:37 +0000 (12:09 +0000)
committerThomas Roessler <roessler@does-not-exist.org>
Fri, 16 Oct 1998 12:09:37 +0000 (12:09 +0000)
lib.c

diff --git a/lib.c b/lib.c
index 78495e13588356ccfdadc3d1955c05ce455204a9..f491c32ac1cb229090ae24bf63af51446f9ffd26 100644 (file)
--- a/lib.c
+++ b/lib.c
@@ -151,6 +151,7 @@ HEADER *mutt_dup_header(HEADER *h)
 
 void mutt_free_header (HEADER **h)
 {
+  if(!h || !*h) return;
   mutt_free_envelope (&(*h)->env);
   mutt_free_body (&(*h)->content);
   safe_free ((void **) &(*h)->tree);