aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog7
-rw-r--r--plugins/desktop-file/plugin.cpp3
2 files changed, 10 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index fa99385e9..ad6df2438 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2005-11-07 Bastien Nocera <hadess@hadess.net>
+
+ reviewed by: Christian Persch <chpe@gnome.org>
+
+ * plugins/desktop-file/plugin.cpp: Fix memleaks in the usage of
+ g_key_file_get_string(). Fixes bug #320901.
+
2005-11-05 Christian Persch <chpe@cvs.gnome.org>
* embed/mozilla/GtkNSSDialog.cpp:
diff --git a/plugins/desktop-file/plugin.cpp b/plugins/desktop-file/plugin.cpp
index d5efa3ebe..74d51212c 100644
--- a/plugins/desktop-file/plugin.cpp
+++ b/plugins/desktop-file/plugin.cpp
@@ -223,6 +223,7 @@ plugin_stream_as_file (NPP instance,
g_key_file_free (keyfile);
return NPERR_GENERIC_ERROR;
}
+ g_free (group);
char *encoding = g_key_file_get_string (keyfile, kDesktopEntry, "Encoding", NULL);
if (!encoding || strcmp (encoding, "UTF-8") != 0) {
@@ -231,6 +232,7 @@ plugin_stream_as_file (NPP instance,
g_key_file_free (keyfile);
return NPERR_GENERIC_ERROR;
}
+ g_free (encoding);
char *type = g_key_file_get_string (keyfile, kDesktopEntry, "Type", NULL);
if (!type || strcmp (type, "Link") != 0) {
@@ -239,6 +241,7 @@ plugin_stream_as_file (NPP instance,
g_key_file_free (keyfile);
return NPERR_GENERIC_ERROR;
}
+ g_free (type);
char *url = g_key_file_get_string (keyfile, kDesktopEntry, "URL", NULL);
if (!url || !url[0]) {