summaryrefslogtreecommitdiff
path: root/test/xlib-surface.c
diff options
context:
space:
mode:
authorCarl Worth <cworth@cworth.org>2005-07-14 15:10:47 +0000
committerCarl Worth <cworth@cworth.org>2005-07-14 15:10:47 +0000
commit3cd006bb2b3986aefaf6cf9002735c430e4bc172 (patch)
tree244cb1ba0169982402a07530d40f6064321b4cb4 /test/xlib-surface.c
parent288f0f7f49849c74c1025804ecb7076b3485b8f2 (diff)
downloadcairo-3cd006bb2b3986aefaf6cf9002735c430e4bc172.tar.gz
Fix to accept a cairo_pattern_t rather than a cairo_surface_t as the primary argument.
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. Remove stale comment. Add missing fclose to keep valgrind happy about memory leaks.
Diffstat (limited to 'test/xlib-surface.c')
-rw-r--r--test/xlib-surface.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/test/xlib-surface.c b/test/xlib-surface.c
index d8c241c8e..2921eb852 100644
--- a/test/xlib-surface.c
+++ b/test/xlib-surface.c
@@ -221,11 +221,13 @@ main (void)
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 @@ main (void)
free (diff_data);
XCloseDisplay (dpy);
+
+ fclose (log_file);
return result;
}