diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2009-01-29 09:50:38 +0000 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2009-01-29 10:10:41 +0000 |
commit | 8388af137841679b7c510980daf3cec1427b6e6b (patch) | |
tree | 2abd6336f5c3944b0d346c64f2fdaa2c6a78cb68 /test/mime-data.c | |
parent | 3752f690b467432ab5b1058d450cb79d719a794a (diff) |
[test] Trivial fixes for error paths.
Kill a few leaks along error paths in the test code.
Diffstat (limited to 'test/mime-data.c')
-rw-r--r-- | test/mime-data.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/test/mime-data.c b/test/mime-data.c index febc32260..b1074cdeb 100644 --- a/test/mime-data.c +++ b/test/mime-data.c @@ -44,6 +44,9 @@ read_file (const cairo_test_context_t *ctx, if (file == NULL) { char path[4096]; + if (errno == ENOMEM) + return CAIRO_STATUS_NO_MEMORY; + /* try again with srcdir */ snprintf (path, sizeof (path), "%s/%s", ctx->srcdir, filename); @@ -100,6 +103,7 @@ paint_file (cairo_t *cr, free, mime_data); if (status) { cairo_surface_destroy (image); + free (mime_data); return cairo_test_status_from_status (ctx, status); } |