[cairo-commit] cairo/test xlib-surface.c,1.3,1.4

Carl Worth commit at pdx.freedesktop.org
Thu Jul 14 15:10:55 PDT 2005


Committed by: cworth

Update of /cvs/cairo/cairo/test
In directory gabe:/tmp/cvs-serv436/test

Modified Files:
	xlib-surface.c 
Log Message:

        * src/cairoint.h:
        * src/cairo-pattern.c: (_cairo_pattern_release_surface): Fix to
        accept a cairo_pattern_t rather than a cairo_surface_t as the
        primary argument.

        * src/cairo-image-surface.c: (_cairo_image_surface_composite),
        (_cairo_image_surface_composite_trapezoids): Track change in
        _cairo_pattern_release_surface and also pass the appropriate
        pattern for each acquired surface. The previous backend mismatch
        was causing memory leaks.

        * src/cairo-xlib-surface.c: (_get_image_surface): Remove stale
        comment.

        * test/xlib-surface.c: (main): Add missing fclose to keep valgrind
        happy about memory leaks.


Index: xlib-surface.c
===================================================================
RCS file: /cvs/cairo/cairo/test/xlib-surface.c,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- xlib-surface.c	17 May 2005 13:05:13 -0000	1.3
+++ xlib-surface.c	14 Jul 2005 22:10:48 -0000	1.4
@@ -221,11 +221,13 @@
     dpy = XOpenDisplay (NULL);
     if (!dpy) {
 	fprintf (log_file, "xlib-surface: Cannot open display, skipping\n");
+	fclose (log_file);
 	return 0;
     }
 
     if (!check_visual (dpy)) {
 	fprintf (log_file, "xlib-surface: default visual is not RGB24 or BGR24, skipping\n");
+	fclose (log_file);
 	return 0;
     }
 
@@ -264,6 +266,8 @@
     free (diff_data);
 
     XCloseDisplay (dpy);
+
+    fclose (log_file);
     
     return result;
 }




More information about the cairo-commit mailing list