Free caches on shutdown

This commit is contained in:
Matthias Clasen 2006-07-20 14:40:57 +00:00
parent bdacdff192
commit c0b6729871
2 changed files with 14 additions and 0 deletions

View File

@ -1,5 +1,8 @@
2006-07-20 Matthias Clasen <mclasen@redhat.com>
* xdgmime.c (xdg_mime_shutdown): Unref the caches.
Patch by Yevgen Muntyan, bugs.freedesktop.org #7496
* xdgmimemagic.c:
* xdgmime.c:
* xdgmime.h: Add xdg_init-free versions of some

View File

@ -584,6 +584,17 @@ xdg_mime_shutdown (void)
parent_list = NULL;
}
if (_caches)
{
int i;
for (i = 0; i < n_caches; i++)
_xdg_mime_cache_unref (_caches[i]);
free (_caches);
_caches = NULL;
n_caches = 0;
}
for (list = callback_list; list; list = list->next)
(list->callback) (list->data);