Merge pull request #115 from glyptodon/fix-palette-free

GUAC-1389: Palette must be freed.
This commit is contained in:
James Muehlner 2016-03-03 11:15:13 -08:00
commit 41a21c9b0c

View File

@ -310,6 +310,7 @@ int guac_png_write(guac_socket* socket, guac_stream* stream,
/* Set up PNG writer */ /* Set up PNG writer */
png = png_create_write_struct(PNG_LIBPNG_VER_STRING, NULL, NULL, NULL); png = png_create_write_struct(PNG_LIBPNG_VER_STRING, NULL, NULL, NULL);
if (!png) { if (!png) {
guac_palette_free(palette);
guac_error = GUAC_STATUS_INTERNAL_ERROR; guac_error = GUAC_STATUS_INTERNAL_ERROR;
guac_error_message = "libpng failed to create write structure"; guac_error_message = "libpng failed to create write structure";
return -1; return -1;