From 57478e2125b92050a2106136e3d54fc029675efc Mon Sep 17 00:00:00 2001 From: Christian Hesse Date: Fri, 12 Jul 2013 15:36:06 +0200 Subject: free same as allocated --- cqrlogo.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/cqrlogo.c b/cqrlogo.c index 255d948..14f01a6 100644 --- a/cqrlogo.c +++ b/cqrlogo.c @@ -92,9 +92,8 @@ int generate_png (struct bitmap_t *bitmap, const char *uri) { png_set_rows (png_ptr, info_ptr, row_pointers); png_write_png (png_ptr, info_ptr, PNG_TRANSFORM_IDENTITY, NULL); - for (y = 0; y < bitmap->height; y++) { + for (y = 0; y < bitmap->height; ++y) png_free (png_ptr, row_pointers[y]); - } png_free (png_ptr, row_pointers); return 0; -- cgit v1.2.3-70-g09d2