diff --git a/src/protocols/vnc/cursor.c b/src/protocols/vnc/cursor.c index bd013f559..449fea382 100644 --- a/src/protocols/vnc/cursor.c +++ b/src/protocols/vnc/cursor.c @@ -124,6 +124,9 @@ void guac_vnc_cursor(rfbClient* client, int x, int y, int w, int h, int bpp) { guac_mem_free(buffer); /* libvncclient does not free rcMask as it does rcSource */ - free(client->rcMask); + if (client->rcMask != NULL) { + free(client->rcMask); + client->rcMask = NULL; + } }