In rfbSendDirContent() we have to make sure to call closedir() before

returning. This did not happen if rfbSendFileTransferMessage() failed.

Signed-off-by: Christian Beier <dontmind@freeshell.org>
pull/1/head
Tobias Doerffel 14 years ago committed by Christian Beier
parent fbb93c9efe
commit 71ad3229f6

@ -1244,7 +1244,11 @@ rfbBool rfbSendDirContent(rfbClientPtr cl, int length, char *buffer)
/*
rfbLog("rfbProcessFileTransfer() rfbDirContentRequest: rfbRDirContent: Sending \"%s\"\n", (char *)win32filename.cFileName);
*/
if (rfbSendFileTransferMessage(cl, rfbDirPacket, rfbADirectory, 0, nOptLen, (char *)&win32filename)==FALSE) return FALSE;
if (rfbSendFileTransferMessage(cl, rfbDirPacket, rfbADirectory, 0, nOptLen, (char *)&win32filename)==FALSE)
{
closedir(dirp);
return FALSE;
}
}
}
}

Loading…
Cancel
Save