Don't leak node->mime_type if we are reusing an existing node. (#170774,

2005-03-20  Matthias Clasen  <mclasen@redhat.com>

	* xdgmimeglob.c (_xdg_glob_hash_insert_text): Don't
	leak node->mime_type if we are reusing an existing
	node.  (#170774, Kjartan Maraas)
This commit is contained in:
Matthias Clasen 2005-03-20 07:10:14 +00:00 committed by Matthias Clasen
parent cca8dd6347
commit 231cb64471
2 changed files with 8 additions and 0 deletions

View File

@ -1,3 +1,9 @@
2005-03-20 Matthias Clasen <mclasen@redhat.com>
* xdgmimeglob.c (_xdg_glob_hash_insert_text): Don't
leak node->mime_type if we are reusing an existing
node. (#170774, Kjartan Maraas)
2005-01-08 Matthias Clasen <mclasen@redhat.com>
* === Released 2.6.1 ===

View File

@ -241,6 +241,8 @@ _xdg_glob_hash_insert_text (XdgGlobHashNode *glob_hash_node,
text = _xdg_utf8_next_char (text);
if (*text == '\000')
{
if (node->mime_type)
free (node->mime_type);
node->mime_type = mime_type;
}
else