From 6c2d736011c09266015d3e2a0b9c08aeba1bbf31 Mon Sep 17 00:00:00 2001 From: Qin Zhao Date: Wed, 25 Nov 2015 10:45:09 -0500 Subject: Fix two memory leaks from pdfium_unittests - remove redundant alloc in fx_codec_jpx_unittest.cpp - free memory allocated by HexDecode calls in fpdf_parser_decode_unittest.cpp BUG=PDFium:239 R=thestig@chromium.org Review URL: https://codereview.chromium.org/1467183006 . --- core/src/fxcodec/codec/fx_codec_jpx_unittest.cpp | 4 ---- 1 file changed, 4 deletions(-) (limited to 'core/src/fxcodec') diff --git a/core/src/fxcodec/codec/fx_codec_jpx_unittest.cpp b/core/src/fxcodec/codec/fx_codec_jpx_unittest.cpp index fe552d2ed1..4139fbde3b 100644 --- a/core/src/fxcodec/codec/fx_codec_jpx_unittest.cpp +++ b/core/src/fxcodec/codec/fx_codec_jpx_unittest.cpp @@ -474,8 +474,6 @@ TEST(fxcodec, YUV420ToRGB) { u.h = 16; u.prec = 8; u.bpp = 8; - u.data = FX_Alloc(OPJ_INT32, u.w * u.h); - memset(u.data, 0, u.w * u.h * sizeof(OPJ_INT32)); opj_image_comp_t v; memset(&v, 0, sizeof(v)); v.dx = 1; @@ -484,8 +482,6 @@ TEST(fxcodec, YUV420ToRGB) { v.h = 16; v.prec = 8; v.bpp = 8; - v.data = FX_Alloc(OPJ_INT32, v.w * v.h); - memset(v.data, 0, v.w * v.h * sizeof(OPJ_INT32)); opj_image_comp_t y; memset(&y, 0, sizeof(y)); y.dx = 1; -- cgit v1.2.3