diff --git a/libvncserver/tightvnc-filetransfer/rfbtightserver.c b/libvncserver/tightvnc-filetransfer/rfbtightserver.c index e2c6594313f71c250ac532cf39c15c47d239c44c..a24666b8889ca9dac5841703e6a28f749dbb1209 100644 --- a/libvncserver/tightvnc-filetransfer/rfbtightserver.c +++ b/libvncserver/tightvnc-filetransfer/rfbtightserver.c @@ -464,10 +464,10 @@ rfbTightProcessArg(int argc, char *argv[]) { void rfbHandleSecTypeTight(rfbClientPtr cl) { - rfbLog("tightvnc-filetransfer/rfbHandleSecTypeTight\n"); - rfbTightClientPtr rtcp = (rfbTightClientPtr) malloc(sizeof(rfbTightClientRec)); + rfbLog("tightvnc-filetransfer/rfbHandleSecTypeTight\n"); + if(rtcp == NULL) { /* Error condition close socket */ rfbLog("Memory error has occured while handling "