diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2009-06-04 14:12:20 +0100 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2009-06-04 14:17:43 +0100 |
commit | 132f44dce1884c9beed8c5e6588140ee8fa9cfbe (patch) | |
tree | 1cd955f3a06de9b3a2c9ebc1114dd74643054ebf /src/cairo-traps.c | |
parent | e89828c5331579d0d4019b6339df09ba1e2aa32e (diff) | |
download | cairo-132f44dce1884c9beed8c5e6588140ee8fa9cfbe.tar.gz |
valgrindify init/fini routines
Annotate object init/fini routines to detect use-after-free for
on-stack/embedded objects.
Diffstat (limited to 'src/cairo-traps.c')
-rw-r--r-- | src/cairo-traps.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/cairo-traps.c b/src/cairo-traps.c index fed3f101c..092bd9d01 100644 --- a/src/cairo-traps.c +++ b/src/cairo-traps.c @@ -47,6 +47,8 @@ _compare_point_fixed_by_y (const void *av, const void *bv); void _cairo_traps_init (cairo_traps_t *traps) { + VG (VALGRIND_MAKE_MEM_UNDEFINED (traps, sizeof (cairo_traps_t))); + traps->status = CAIRO_STATUS_SUCCESS; traps->num_traps = 0; @@ -91,6 +93,8 @@ _cairo_traps_fini (cairo_traps_t *traps) { if (traps->traps != traps->traps_embedded) free (traps->traps); + + VG (VALGRIND_MAKE_MEM_NOACCESS (traps, sizeof (cairo_traps_t))); } /** |