mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2024-11-10 03:16:17 +01:00
Plug a memory leak
svn path=/trunk/; revision=7520
This commit is contained in:
parent
991b625aea
commit
130d8f010f
@ -1,3 +1,7 @@
|
||||
2008-09-20 Matthias Clasen <mclasen@redhat.com>
|
||||
|
||||
* gdesktopappinfo.c (expand_macro_single): Plug a memory leak
|
||||
|
||||
2008-09-17 Matthias Clasen <mclasen@redhat.com>
|
||||
|
||||
* === Released 2.18.1 ===
|
||||
|
@ -480,7 +480,7 @@ expand_macro_single (char macro, char *uri)
|
||||
{
|
||||
GFile *file;
|
||||
char *result = NULL;
|
||||
char *path;
|
||||
char *path, *name;
|
||||
|
||||
file = g_file_new_for_uri (uri);
|
||||
path = g_file_get_path (file);
|
||||
@ -500,12 +500,20 @@ expand_macro_single (char macro, char *uri)
|
||||
case 'd':
|
||||
case 'D':
|
||||
if (path)
|
||||
result = g_shell_quote (g_path_get_dirname (path));
|
||||
{
|
||||
name = g_path_get_dirname (path);
|
||||
result = g_shell_quote (name);
|
||||
g_free (name);
|
||||
}
|
||||
break;
|
||||
case 'n':
|
||||
case 'N':
|
||||
if (path)
|
||||
result = g_shell_quote (g_path_get_basename (path));
|
||||
{
|
||||
name = g_path_get_basename (path);
|
||||
result = g_shell_quote (name);
|
||||
g_free (name);
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user