diff options
author | vandebo@chromium.org <vandebo@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2011-07-27 18:38:11 +0000 |
---|---|---|
committer | vandebo@chromium.org <vandebo@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2011-07-27 18:38:11 +0000 |
commit | 93225ff5d5872faada54a073423e802e8e721323 (patch) | |
tree | ea90a1364150c61d56c0c43ea88ae807409d7c24 | |
parent | 026dceead9b957e0b080d55c5a7fbb919e6f00b6 (diff) |
[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
-rw-r--r-- | src/pdf/SkPDFFont.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/pdf/SkPDFFont.cpp b/src/pdf/SkPDFFont.cpp index 0191cb1b0e..fce120206e 100644 --- a/src/pdf/SkPDFFont.cpp +++ b/src/pdf/SkPDFFont.cpp @@ -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; } } |