Bug 551149 – xdgmime mem leak

* xdgmime/xdgmime.c (xdg_mime_init_from_directory): Plug
        a memory leak. Patch by Christian Persch


svn path=/branches/glib-2-16/; revision=7468
This commit is contained in:
Matthias Clasen 2008-09-11 19:19:40 +00:00
parent bf271c2530
commit 327d4e7242
2 changed files with 14 additions and 2 deletions

View File

@ -1,3 +1,12 @@
2008-09-11 Matthias Clasen <mclasen@redhat.com>
Merge from trunk
Bug 551149 xdgmime mem leak
* xdgmime/xdgmime.c (xdg_mime_init_from_directory): Plug
a memory leak. Patch by Christian Persch
2008-09-11 Matthias Clasen <mclasen@redhat.com>
Merge from trunk

View File

@ -101,8 +101,11 @@ xdg_dir_time_list_add (char *file_name,
for (list = dir_time_list; list; list = list->next)
{
if (strcmp (list->directory_name, file_name) == 0)
return;
if (strcmp (list->directory_name, file_name) == 0)
{
free (file_name);
return;
}
}
list = calloc (1, sizeof (XdgDirTimeList));