summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authordscho <dscho>2003-07-29 15:02:33 +0000
committerdscho <dscho>2003-07-29 15:02:33 +0000
commit964aa1628f2cc4fac17c22dc89fc2439bd87b00e (patch)
treefbb5a0eacfd5ab9f1c84a0825744b5e69364eba5 /test
parent9b46601daa37906feb3c2334200170e53486cdac (diff)
downloadlibtdevnc-964aa1628f2cc4fac17c22dc89fc2439bd87b00e.tar.gz
libtdevnc-964aa1628f2cc4fac17c22dc89fc2439bd87b00e.zip
further valgrinding showed leaked mallocs
Diffstat (limited to 'test')
-rw-r--r--test/tight-1.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/test/tight-1.c b/test/tight-1.c
index 825ca83..987d481 100644
--- a/test/tight-1.c
+++ b/test/tight-1.c
@@ -1,9 +1,11 @@
+#include <time.h>
#include <rfb/rfb.h>
#include <rfb/rfbclient.h>
int main(int argc,char** argv)
{
int i,j;
+ time_t t=time(0);
rfbScreenInfoPtr server=rfbGetScreen(&argc,argv,400,300,8,3,4);
rfbClient* client=rfbGetClient(&argc,argv,8,3,4);
@@ -13,7 +15,7 @@ int main(int argc,char** argv)
server->frameBuffer[j]=j;
//server->maxRectsPerUpdate=-1;
rfbInitServer(server);
- while(1) {
+ while(time(0)-t<20) {
for(j=0;j<400;j+=10)
for(i=0;i<300;i+=10)
@@ -21,5 +23,10 @@ int main(int argc,char** argv)
rfbProcessEvents(server,5000);
}
+
+ free(server->frameBuffer);
+ rfbScreenCleanup(server);
+ rfbClientCleanup(client);
+
return(0);
}