Kaydet (Commit) 26c4f64a authored tarafından Mark Wielaard's avatar Mark Wielaard Kaydeden (comit) Noel Power

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/4156Reviewed-by: 's avatarNoel Power <noel.power@suse.com>
Tested-by: 's avatarNoel Power <noel.power@suse.com>
üst 2aacba2b
......@@ -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();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment