[DESK]
authorAmine Khaldi <amine.khaldi@reactos.org>
Thu, 26 Jun 2014 19:15:51 +0000 (19:15 +0000)
committerAmine Khaldi <amine.khaldi@reactos.org>
Thu, 26 Jun 2014 19:15:51 +0000 (19:15 +0000)
* Plug a leak. CID 1206913.

svn path=/trunk/; revision=63646

reactos/dll/cpl/desk/devsett.c

index ec7e986..8006153 100644 (file)
@@ -667,7 +667,10 @@ CDevSettings_GetData(IDataObject* iface,
         {
             hr = StringCbCopy(pszBuf, (wcslen(pszRet) + 1) * sizeof(WCHAR), pszRet);
             if (FAILED(hr))
+            {
+                GlobalFree(pszBuf);
                 return hr;
+            }
 
             pmedium->tymed = TYMED_HGLOBAL;
             pmedium->hGlobal = pszBuf;