Signed-off-by: Slávek Banko <slavek.banko@axis.cz>
@ -1143,8 +1143,10 @@ HandleRFBServerMessage()
return False;
}
if (!ReadFromRFBServer(serverCutText, msg.sct.length))
if (!ReadFromRFBServer(serverCutText, msg.sct.length)) {
free(serverCutText);
serverCutText[msg.sct.length] = 0;
newServerCut(serverCutText, msg.sct.length); /* takes ownership of serverCutText */