diff options
Diffstat (limited to 'libvncserver/sockets.c')
-rw-r--r-- | libvncserver/sockets.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/libvncserver/sockets.c b/libvncserver/sockets.c index e18ce70..b3d5b59 100644 --- a/libvncserver/sockets.c +++ b/libvncserver/sockets.c @@ -647,11 +647,12 @@ rfbWriteExact(rfbClientPtr cl, #ifdef LIBVNCSERVER_WITH_WEBSOCKETS if (cl->webSockets) { - if ((len = webSocketsEncode(cl, buf, len)) < 0) { + char *tmp = NULL; + if ((len = webSocketsEncode(cl, buf, len, &tmp)) < 0) { rfbErr("WriteExact: WebSockets encode error\n"); return -1; } - buf = cl->encodeBuf; + buf = tmp; } #endif |