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
diff --git a/src/ports/SkFontHost_win.cpp b/src/ports/SkFontHost_win.cpp
index 1253f84..1e269f7 100755
--- a/src/ports/SkFontHost_win.cpp
+++ b/src/ports/SkFontHost_win.cpp
@@ -1386,7 +1386,7 @@
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 @@
}
Error:
+ReturnInfo:
SelectObject(hdc, savefont);
DeleteObject(designFont);
DeleteObject(font);