summaryrefslogtreecommitdiffstats
path: root/libvncserver/main.c
diff options
context:
space:
mode:
Diffstat (limited to 'libvncserver/main.c')
-rw-r--r--libvncserver/main.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/libvncserver/main.c b/libvncserver/main.c
index d2dc69f..4e59c98 100644
--- a/libvncserver/main.c
+++ b/libvncserver/main.c
@@ -532,7 +532,7 @@ rfbScreenInfoPtr rfbGetScreen(int* argc,char** argv,
int width,int height,int bitsPerSample,int samplesPerPixel,
int bytesPerPixel)
{
- rfbScreenInfoPtr screen=malloc(sizeof(rfbScreenInfo));
+ rfbScreenInfoPtr screen=calloc(sizeof(rfbScreenInfo),1);
INIT_MUTEX(logMutex);
@@ -759,6 +759,7 @@ void rfbShutdownServer(rfbScreenInfoPtr screen,rfbBool disconnectClients) {
if (cl->sock > -1)
/* we don't care about maxfd here, because the server goes away */
rfbCloseClient(cl);
+ rfbReleaseClientIterator(iter);
}
rfbShutdownSockets(screen);