It is possible for ``lang'' to be NULL, and thus free'ing it would be a bad

idea.  Add a check to prevent a crash.

Submitted by:	Mark Evenson <evenson@panix.com>
This commit is contained in:
Joe Marcus Clarke 2004-04-13 03:17:32 +00:00
parent 588b8426de
commit c9791c336c
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=106860

View File

@ -0,0 +1,12 @@
--- update-mime-database.c.orig Mon Oct 13 11:43:38 2003
+++ update-mime-database.c Mon Apr 12 22:45:01 2004
@@ -377,7 +377,8 @@
}
}
- xmlFree(lang);
+ if (lang)
+ xmlFree(lang);
}
/* 'node' is a <mime-type> node from a source file, whose type is 'type'.