Commit 71ad3229 authored by Tobias Doerffel's avatar Tobias Doerffel Committed by Christian Beier

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

returning. This did not happen if rfbSendFileTransferMessage() failed.
Signed-off-by: 's avatarChristian Beier <dontmind@freeshell.org>
parent fbb93c9e
...@@ -1244,7 +1244,11 @@ rfbBool rfbSendDirContent(rfbClientPtr cl, int length, char *buffer) ...@@ -1244,7 +1244,11 @@ rfbBool rfbSendDirContent(rfbClientPtr cl, int length, char *buffer)
/* /*
rfbLog("rfbProcessFileTransfer() rfbDirContentRequest: rfbRDirContent: Sending \"%s\"\n", (char *)win32filename.cFileName); 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;
}
} }
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment