diff options
author | edisonn@google.com <edisonn@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2013-04-06 20:26:15 +0000 |
---|---|---|
committer | edisonn@google.com <edisonn@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2013-04-06 20:26:15 +0000 |
commit | 390c6d7a9018e233a6519397ac6c739fb21a99ef (patch) | |
tree | b932664a585f94b6e5fa8999b00cc29ef41da532 | |
parent | cff0243b0ff1de25b3d99e2bf15a30c0e0a31261 (diff) |
Fix font handles leak. We return without freeing resources.
Fix for crbug/225256
Review URL: https://codereview.chromium.org/13637004
git-svn-id: http://skia.googlecode.com/svn/trunk@8549 2bbb7eff-a529-9590-31e7-b0007b416f81
-rwxr-xr-x | src/ports/SkFontHost_win.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/ports/SkFontHost_win.cpp b/src/ports/SkFontHost_win.cpp index 1253f84ebb..1e269f7acb 100755 --- a/src/ports/SkFontHost_win.cpp +++ b/src/ports/SkFontHost_win.cpp @@ -1386,7 +1386,7 @@ SkAdvancedTypefaceMetrics* LogFontTypeface::onGetAdvancedTypefaceMetrics( info->fStemV = 0; info->fCapHeight = 0; info->fBBox = SkIRect::MakeEmpty(); - return info; + goto ReturnInfo; } // If this bit is clear the font is a fixed pitch font. @@ -1453,6 +1453,7 @@ SkAdvancedTypefaceMetrics* LogFontTypeface::onGetAdvancedTypefaceMetrics( } Error: +ReturnInfo: SelectObject(hdc, savefont); DeleteObject(designFont); DeleteObject(font); |