2008-09-20 Matthias Clasen * gdesktopappinfo.c (expand_macro_single): Plug a memory leak --- branches/glib-2-18/gio/gdesktopappinfo.c 2008/09/21 00:00:18 7520 +++ branches/glib-2-18/gio/gdesktopappinfo.c 2008/09/21 00:04:37 7521 @@ -480,7 +480,7 @@ { 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 @@ 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; }