glib r7520 - trunk/gio
- From: matthiasc svn gnome org
- To: svn-commits-list gnome org
- Subject: glib r7520 - trunk/gio
- Date: Sun, 21 Sep 2008 00:00:18 +0000 (UTC)
Author: matthiasc
Date: Sun Sep 21 00:00:18 2008
New Revision: 7520
URL: http://svn.gnome.org/viewvc/glib?rev=7520&view=rev
Log:
Plug a memory leak
Modified:
trunk/gio/ChangeLog
trunk/gio/gdesktopappinfo.c
Modified: trunk/gio/gdesktopappinfo.c
==============================================================================
--- trunk/gio/gdesktopappinfo.c (original)
+++ trunk/gio/gdesktopappinfo.c Sun Sep 21 00:00:18 2008
@@ -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;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]