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

Unified Diff: third_party/libpng/pngwrite.c

Issue 2771903002: libpng: Optimize RGBA png_do_expand_palette
Patch Set: Correct potentially uninitialized loop variable Created 3 years, 9 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 | « third_party/libpng/pngstruct.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/libpng/pngwrite.c
diff --git a/third_party/libpng/pngwrite.c b/third_party/libpng/pngwrite.c
index 181a899438b35e80cfae696be48d2a3cb81cc9ca..87881976017f3d4d0d3fd72ece4a0bc8bfd02855 100644
--- a/third_party/libpng/pngwrite.c
+++ b/third_party/libpng/pngwrite.c
@@ -937,6 +937,10 @@ png_write_destroy(png_structrp png_ptr)
png_free_buffer_list(png_ptr, &png_ptr->zbuffer_list);
png_free(png_ptr, png_ptr->row_buf);
png_ptr->row_buf = NULL;
+#ifdef PNG_READ_EXPANDED_SUPPORTED
+ png_free(png_ptr, png_ptr->row_tmp_palette);
+ png_ptr->row_tmp_palette = NULL;
+#endif
#ifdef PNG_WRITE_FILTER_SUPPORTED
png_free(png_ptr, png_ptr->prev_row);
png_free(png_ptr, png_ptr->try_row);
« no previous file with comments | « third_party/libpng/pngstruct.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698