mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-01-26 14:06:15 +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>
|
2008-09-17 Matthias Clasen <mclasen@redhat.com>
|
||||||
|
|
||||||
* === Released 2.18.1 ===
|
* === Released 2.18.1 ===
|
||||||
|
@ -480,7 +480,7 @@ expand_macro_single (char macro, char *uri)
|
|||||||
{
|
{
|
||||||
GFile *file;
|
GFile *file;
|
||||||
char *result = NULL;
|
char *result = NULL;
|
||||||
char *path;
|
char *path, *name;
|
||||||
|
|
||||||
file = g_file_new_for_uri (uri);
|
file = g_file_new_for_uri (uri);
|
||||||
path = g_file_get_path (file);
|
path = g_file_get_path (file);
|
||||||
@ -500,12 +500,20 @@ expand_macro_single (char macro, char *uri)
|
|||||||
case 'd':
|
case 'd':
|
||||||
case 'D':
|
case 'D':
|
||||||
if (path)
|
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;
|
break;
|
||||||
case 'n':
|
case 'n':
|
||||||
case 'N':
|
case 'N':
|
||||||
if (path)
|
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;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user