From 298083a09e2154335f564211183a73f79d9c80f9 Mon Sep 17 00:00:00 2001 From: marcus Date: Tue, 13 Apr 2004 03:17:32 +0000 Subject: 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 --- misc/shared-mime-info/files/patch-update-mime-database.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 misc/shared-mime-info/files/patch-update-mime-database.c (limited to 'misc') 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 node from a source file, whose type is 'type'. -- cgit