Commit 0417f83b 0417f83b0dd75d26367ef2569d7f7437a6bead2a by Sergey Poznyakoff

Fix NULL dereference

* libmailutils/mime/mimehdr.c (mu_mime_param_free): Check if argument
is NULL.
1 parent 480f7d0b
...@@ -48,10 +48,13 @@ ...@@ -48,10 +48,13 @@
48 void 48 void
49 mu_mime_param_free (struct mu_mime_param *p) 49 mu_mime_param_free (struct mu_mime_param *p)
50 { 50 {
51 free (p->lang); 51 if (p)
52 free (p->cset); 52 {
53 free (p->value); 53 free (p->lang);
54 free (p); 54 free (p->cset);
55 free (p->value);
56 free (p);
57 }
55 } 58 }
56 59
57 /* Treat ITEM as a pointer to struct mu_mime_param and reclaim all 60 /* Treat ITEM as a pointer to struct mu_mime_param and reclaim all
......