[Libreoffice-commits] core.git: vcl/unx

Mark Wielaard mark at klomp.org
Wed Jun 5 01:43:58 PDT 2013


 vcl/unx/gtk/fpicker/SalGtkPicker.cxx |    1 +
 1 file changed, 1 insertion(+)

New commits:
commit 26c4f64a7f7f72e40a3ff1e76eb95a538d1c56db
Author: Mark Wielaard <mark at klomp.org>
Date:   Tue Jun 4 21:52:33 2013 +0200

    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 at suse.com>
    Tested-by: Noel Power <noel.power at suse.com>

diff --git a/vcl/unx/gtk/fpicker/SalGtkPicker.cxx b/vcl/unx/gtk/fpicker/SalGtkPicker.cxx
index d14c00b..ed976d7 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();


More information about the Libreoffice-commits mailing list