summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMark Wielaard <mark@klomp.org>2013-06-04 21:52:33 +0200
committerNoel Power <noel.power@suse.com>2013-06-05 08:43:37 +0000
commit26c4f64a7f7f72e40a3ff1e76eb95a538d1c56db (patch)
tree31dc672e078110f5011a28bcff3b271afd816201
parent2aacba2b2a43079c5000b6564b0d192cd208893c (diff)
Fix memory leak in SalGtkPicker::uritounicode.
The gchars array returned by g_filename_from_uri will be copied into the OUString sEncoded and should be freed. Change-Id: Ib610cce5848607826632c0f5e32020708dac7645 Reviewed-on: https://gerrit.libreoffice.org/4156 Reviewed-by: Noel Power <noel.power@suse.com> Tested-by: Noel Power <noel.power@suse.com>
-rw-r--r--vcl/unx/gtk/fpicker/SalGtkPicker.cxx1
1 files changed, 1 insertions, 0 deletions
diff --git a/vcl/unx/gtk/fpicker/SalGtkPicker.cxx b/vcl/unx/gtk/fpicker/SalGtkPicker.cxx
index d14c00bf4c6b..ed976d7f8501 100644
--- a/vcl/unx/gtk/fpicker/SalGtkPicker.cxx
+++ b/vcl/unx/gtk/fpicker/SalGtkPicker.cxx
@@ -60,6 +60,7 @@ OUString SalGtkPicker::uritounicode(const gchar* pIn)
{
OUString sEncoded(pEncodedFileName, strlen(pEncodedFileName),
osl_getThreadTextEncoding());
+ g_free (pEncodedFileName);
INetURLObject aCurrentURL(sEncoded, INetURLObject::FSYS_UNX);
aCurrentURL.SetHost(aURL.GetHost());
sURL = aCurrentURL.getExternalURL();