GUAC-236: Ignore free attempts on NULL buffers.
This commit is contained in:
parent
dea754d846
commit
96104c099b
@ -60,8 +60,15 @@ static void guacenc_buffer_free_image(guacenc_buffer* buffer) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void guacenc_buffer_free(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);
|
guacenc_buffer_free_image(buffer);
|
||||||
free(buffer);
|
free(buffer);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
int guacenc_buffer_resize(guacenc_buffer* buffer, int width, int height) {
|
int guacenc_buffer_resize(guacenc_buffer* buffer, int width, int height) {
|
||||||
|
Loading…
Reference in New Issue
Block a user