diff options
author | Bastien Nocera <hadess@hadess.net> | 2005-11-08 03:33:31 +0800 |
---|---|---|
committer | Bastien Nocera <hadess@src.gnome.org> | 2005-11-08 03:33:31 +0800 |
commit | b19e5ec32839085cb639d4fbbbe13b1d0526a2f7 (patch) | |
tree | 0b0962078ea96d422e1f058e7111196cec9c99ef /plugins | |
parent | 6722139ac9f06cd3874c2836868af4ff69471d97 (diff) | |
download | gsoc2013-epiphany-b19e5ec32839085cb639d4fbbbe13b1d0526a2f7.tar gsoc2013-epiphany-b19e5ec32839085cb639d4fbbbe13b1d0526a2f7.tar.gz gsoc2013-epiphany-b19e5ec32839085cb639d4fbbbe13b1d0526a2f7.tar.bz2 gsoc2013-epiphany-b19e5ec32839085cb639d4fbbbe13b1d0526a2f7.tar.lz gsoc2013-epiphany-b19e5ec32839085cb639d4fbbbe13b1d0526a2f7.tar.xz gsoc2013-epiphany-b19e5ec32839085cb639d4fbbbe13b1d0526a2f7.tar.zst gsoc2013-epiphany-b19e5ec32839085cb639d4fbbbe13b1d0526a2f7.zip |
reviewed by: Christian Persch <chpe@gnome.org>
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.
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/desktop-file/plugin.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
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]) { |