diff options
author | Tobias Doerffel <tobias.doerffel@gmail.com> | 2010-10-20 15:16:07 +0200 |
---|---|---|
committer | Christian Beier <dontmind@freeshell.org> | 2010-10-20 15:16:07 +0200 |
commit | 71ad3229f697a74bf633500200728d345be65410 (patch) | |
tree | f0b2a107e41e79a47d10a5578c10b7652328924e | |
parent | fbb93c9efe9105c6bd74333ed144111f59ba60a8 (diff) | |
download | libvncserver-71ad3229f697a74bf633500200728d345be65410.zip libvncserver-71ad3229f697a74bf633500200728d345be65410.tar.gz |
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>
-rw-r--r-- | libvncserver/rfbserver.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/libvncserver/rfbserver.c b/libvncserver/rfbserver.c index 5f8d22a..b540f04 100644 --- a/libvncserver/rfbserver.c +++ b/libvncserver/rfbserver.c @@ -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; + } } } } |