diff options
author | dscho <dscho> | 2005-05-14 11:13:52 +0000 |
---|---|---|
committer | dscho <dscho> | 2005-05-14 11:13:52 +0000 |
commit | 446a6fabac3d00f1f4e05cf6cba483f4bfb3efba (patch) | |
tree | 5b82f6d88e6522da6b725d3ba769e629568a082f /libvncserver/main.c | |
parent | 3a7e70de49823259558694a3f92401a9f966d9da (diff) | |
download | libtdevnc-446a6fabac3d00f1f4e05cf6cba483f4bfb3efba.tar.gz libtdevnc-446a6fabac3d00f1f4e05cf6cba483f4bfb3efba.zip |
fix memory leaks detected using valgrind
Diffstat (limited to 'libvncserver/main.c')
-rw-r--r-- | libvncserver/main.c | 3 |
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); |