projects
/
platform
/
upstream
/
gobject-introspection.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
a7bfba3
)
tests: Fix a memory leak
author
Jasper St. Pierre
<jstpierre@mecheye.net>
Fri, 25 May 2012 20:00:38 +0000
(16:00 -0400)
committer
Jasper St. Pierre
<jstpierre@mecheye.net>
Fri, 25 May 2012 20:36:46 +0000
(16:36 -0400)
We need to unref the cairo surface here, as we are making the context
be the sole owner of it.
https://bugzilla.gnome.org/show_bug.cgi?id=671687
tests/scanner/regress.c
patch
|
blob
|
history
diff --git
a/tests/scanner/regress.c
b/tests/scanner/regress.c
index
bcab7f8
..
ca8d6ef
100644
(file)
--- a/
tests/scanner/regress.c
+++ b/
tests/scanner/regress.c
@@
-294,8
+294,11
@@
cairo_t *
regress_test_cairo_context_full_return (void)
{
cairo_surface_t *surface;
+ cairo_t *cr;
surface = cairo_image_surface_create (CAIRO_FORMAT_ARGB32, 10, 10);
- return cairo_create (surface);
+ cr = cairo_create (surface);
+ cairo_surface_destroy (surface);
+ return cr;
}
/**