Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(131)

Unified Diff: src/ports/SkFontHost_win.cpp

Issue 13637004: Fix font handles leak. We return without freeing resources. (Closed) Base URL: http://skia.googlecode.com/svn/trunk/
Patch Set: Created 7 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/ports/SkFontHost_win.cpp
===================================================================
--- src/ports/SkFontHost_win.cpp (revision 8437)
+++ src/ports/SkFontHost_win.cpp (working copy)
@@ -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:
Vitaly Buka (NO REVIEWS) 2013/04/06 19:33:43 Why not just rename Error: -> Exit: or Return:
edisonn 2013/04/08 15:09:43 this message was lost somehow: I prefer ReturnInfo
+ReturnInfo:
SelectObject(hdc, savefont);
DeleteObject(designFont);
DeleteObject(font);
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698