GUAC-236: Ignore free attempts on NULL buffers.

This commit is contained in:
Michael Jumper 2016-02-27 15:28:24 -08:00
parent dea754d846
commit 96104c099b

View File

@ -60,8 +60,15 @@ static void guacenc_buffer_free_image(guacenc_buffer* buffer) {
}
void guacenc_buffer_free(guacenc_buffer* buffer) {
/* Ignore NULL buffer */
if (buffer == NULL)
return;
/* Free buffer and underlying image */
guacenc_buffer_free_image(buffer);
free(buffer);
}
int guacenc_buffer_resize(guacenc_buffer* buffer, int width, int height) {