[PDF] Fix mem leak in font subsetting.
Original CL: http://codereview.appspot.com/4809053/ Review URL: http://codereview.appspot.com/4825052 git-svn-id: http://skia.googlecode.com/svn/trunk@1977 2bbb7eff-a529-9590-31e7-b0007b416f81
This commit is contained in:
parent
026dceead9
commit
93225ff5d5
@ -469,11 +469,11 @@ static int get_subset_font_stream(const char* fontName,
|
||||
glyphIDs.count(),
|
||||
&subsetFont);
|
||||
if (subsetFontSize > 0 && subsetFont != NULL) {
|
||||
SkData* data = SkData::NewWithProc(subsetFont,
|
||||
subsetFontSize,
|
||||
sk_delete_array,
|
||||
NULL);
|
||||
subsetFontStream = new SkPDFStream(data);
|
||||
SkAutoDataUnref data(SkData::NewWithProc(subsetFont,
|
||||
subsetFontSize,
|
||||
sk_delete_array,
|
||||
NULL));
|
||||
subsetFontStream = new SkPDFStream(data.get());
|
||||
fontSize = subsetFontSize;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user