usp10: Avoid memory leak in ScriptTextOut (coverity)
André Hentschel
nerv at dawncrow.de
Tue Oct 30 14:06:57 CDT 2012
CID 713770
---
dlls/usp10/usp10.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/dlls/usp10/usp10.c b/dlls/usp10/usp10.c
index 9bd55b4..7f181d0 100644
--- a/dlls/usp10/usp10.c
+++ b/dlls/usp10/usp10.c
@@ -3246,7 +3246,10 @@ HRESULT WINAPI ScriptTextOut(const HDC hdc, SCRIPT_CACHE *psc, int x, int y, UIN
rtlGlyphs = heap_alloc(cGlyphs * sizeof(WORD));
if (!rtlGlyphs)
+ {
+ heap_free(lpDx);
return E_OUTOFMEMORY;
+ }
for (i = 0; i < cGlyphs; i++)
rtlGlyphs[i] = pwGlyphs[cGlyphs-1-i];
--
1.8.0
--
Best Regards, André Hentschel
More information about the wine-patches
mailing list