Author: akhaldi
Date: Thu Jun 26 19:15:51 2014
New Revision: 63646
URL:
http://svn.reactos.org/svn/reactos?rev=63646&view=rev
Log:
[DESK]
* Plug a leak. CID 1206913.
Modified:
trunk/reactos/dll/cpl/desk/devsett.c
Modified: trunk/reactos/dll/cpl/desk/devsett.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/cpl/desk/devsett.c?rev…
==============================================================================
--- trunk/reactos/dll/cpl/desk/devsett.c [iso-8859-1] (original)
+++ trunk/reactos/dll/cpl/desk/devsett.c [iso-8859-1] Thu Jun 26 19:15:51 2014
@@ -667,7 +667,10 @@
{
hr = StringCbCopy(pszBuf, (wcslen(pszRet) + 1) * sizeof(WCHAR), pszRet);
if (FAILED(hr))
+ {
+ GlobalFree(pszBuf);
return hr;
+ }
pmedium->tymed = TYMED_HGLOBAL;
pmedium->hGlobal = pszBuf;