[Xcb-commit] 2 commits - xcb-demo

Vincent Torri doursse at kemper.freedesktop.org
Fri Apr 28 10:28:02 PDT 2006


 xcb-demo/tests/lissajoux.c |    7 ++++++-
 1 files changed, 6 insertions(+), 1 deletion(-)

New commits:
diff-tree bc4bdb228e01c16f8507bdf6aa304b40ae431ed0 (from parents)
Merge: bc08afdd2dae8b90796593ce35f9f45da230ea56 ea69eda4c59aecee2799ee203f22b5fdefe07712
Author: TORRI Vincent <torri at doursse.(none)>
Date:   Fri Apr 28 19:27:33 2006 +0200

    Merge branch 'master' of git+ssh://doursse@git.freedesktop.org/git/xcb

diff-tree bc08afdd2dae8b90796593ce35f9f45da230ea56 (from 7a0fa477de99b5e2104598dc056deeae9a9df583)
Author: TORRI Vincent <torri at doursse.(none)>
Date:   Fri Apr 28 19:26:42 2006 +0200

    fix one part of hte leaks

diff --git a/xcb-demo/tests/lissajoux.c b/xcb-demo/tests/lissajoux.c
index ab58fc3..45b971f 100644
--- a/xcb-demo/tests/lissajoux.c
+++ b/xcb-demo/tests/lissajoux.c
@@ -120,6 +120,10 @@ step (Data *datap)
       printf("FRAME COUNT..: %i frames\n", loop_count);
       printf("TIME.........: %3.3f seconds\n", t);
       printf("AVERAGE FPS..: %3.3f fps\n", (double)loop_count / t);
+      /* if datap->image is not NULL, this means that */
+      /* we are using the SHM mode */
+      if (datap->image)
+        XCBImageSHMDestroy (datap->image);
       XCBDisconnect (datap->conn);
       exit(0);
     }
@@ -145,7 +149,7 @@ shm_test (Data *datap)
       else
 	format = 0;
       datap->image = XCBImageSHMCreate (datap->conn, datap->depth,
-				      format, NULL, W_W, W_H);
+                                        format, NULL, W_W, W_H);
       assert(datap->image);
 
       shminfo.shmid = shmget (IPC_PRIVATE,
@@ -161,6 +165,7 @@ shm_test (Data *datap)
 		    shminfo.shmid, 0);
       shmctl_status = shmctl(shminfo.shmid, IPC_RMID, 0);
       assert(shmctl_status != -1);
+      free (rep);
     }
 
   if (datap->image)


More information about the xcb-commit mailing list