info pointer memory de-allocate svace issue. 09/115709/1 accepted/tizen_3.0_common accepted/tizen_3.0_ivi accepted/tizen_3.0_mobile accepted/tizen_3.0_tv accepted/tizen/3.0/common/20170222.125630 accepted/tizen/3.0/ivi/20170222.082636 accepted/tizen/3.0/mobile/20170222.082520 accepted/tizen/3.0/tv/20170222.082553 submit/tizen_3.0/20170221.074556
authorLim DoHyung <delight.lim@samsung.com>
Tue, 21 Feb 2017 05:54:28 +0000 (14:54 +0900)
committerLim DoHyung <delight.lim@samsung.com>
Tue, 21 Feb 2017 05:54:28 +0000 (14:54 +0900)
Change-Id: If17d56a39922429baba6e705aa3a02d73f1374f3
Signed-off-by: Lim DoHyung <delight.lim@samsung.com>
common-adaptor/common-adaptor-png.c

index 91f9aa499a0fd2d38c41ff85bf3415fe2b9efd28..8eee306cf913ccb2523d68ca8648f752554a4f92 100755 (executable)
@@ -71,7 +71,7 @@ int bp_common_raw_to_png(const unsigned char *raw_data, int width,
                png_voidp png_buffer = calloc(width * height, sizeof(png_bytep));
                if (png_buffer == NULL) {
                        TRACE_ERROR("malloc failed");
-                       png_destroy_write_struct(&png_ptr, (png_infopp)0);
+                       png_destroy_write_struct(&png_ptr, &info_ptr);
                        return -1;
                }
                bp_image_fmt write_io_ptr;
@@ -86,7 +86,7 @@ int bp_common_raw_to_png(const unsigned char *raw_data, int width,
                png_bytep *row_pointers = malloc((size_t)(height * sizeof(png_bytep)));
                if (row_pointers == NULL){
                        TRACE_ERROR("malloc failed");
-                       png_destroy_write_struct(&png_ptr, (png_infopp)0);
+                       png_destroy_write_struct(&png_ptr, &info_ptr);
                        free(png_buffer);
                        return -1;
                }