diff options
author | marcus <marcus@FreeBSD.org> | 2004-04-13 11:17:32 +0800 |
---|---|---|
committer | marcus <marcus@FreeBSD.org> | 2004-04-13 11:17:32 +0800 |
commit | 298083a09e2154335f564211183a73f79d9c80f9 (patch) | |
tree | adc40b383df4a8f27c2354193ce4d81dbaaeb12c | |
parent | 3d1ac49c06de8bdf09b4d8ea67790d31f66616a1 (diff) | |
download | freebsd-ports-gnome-298083a09e2154335f564211183a73f79d9c80f9.tar.gz freebsd-ports-gnome-298083a09e2154335f564211183a73f79d9c80f9.tar.zst freebsd-ports-gnome-298083a09e2154335f564211183a73f79d9c80f9.zip |
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>
-rw-r--r-- | misc/shared-mime-info/files/patch-update-mime-database.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/misc/shared-mime-info/files/patch-update-mime-database.c b/misc/shared-mime-info/files/patch-update-mime-database.c new file mode 100644 index 000000000000..31465c2972e8 --- /dev/null +++ b/misc/shared-mime-info/files/patch-update-mime-database.c @@ -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'. |