comparison png.c @ 1592:31effaadf877

Fix some memory errors (mostly leaks) identified by valgrind
author Michael Pavone <pavone@retrodev.com>
date Fri, 22 Jun 2018 23:10:27 -0700
parents 0ec89dadb36d
children 81eebbe6b2e3
comparison
equal deleted inserted replaced
1591:5cfc7e4a207e 1592:31effaadf877
428 { 428 {
429 *(cur_pixel++) = pixel(&cur_byte, &last_line, bpp, x, filter); 429 *(cur_pixel++) = pixel(&cur_byte, &last_line, bpp, x, filter);
430 } 430 }
431 last_line = line_start; 431 last_line = line_start;
432 } 432 }
433 free(decomp_buffer);
433 } else { 434 } else {
434 //skip uncrecognized chunks 435 //skip uncrecognized chunks
435 cur += 4 + chunk_size; 436 cur += 4 + chunk_size;
436 } 437 }
437 } 438 }