Module: wine Branch: master Commit: 4ee73e69b5e7a01852967f6609a551b01c0311d4 URL: http://source.winehq.org/git/wine.git/?a=commit;h=4ee73e69b5e7a01852967f6609...
Author: André Hentschel nerv@dawncrow.de Date: Tue Oct 30 20:06:57 2012 +0100
usp10: Avoid memory leak in ScriptTextOut (coverity).
---
dlls/usp10/usp10.c | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-)
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];