diff options
author | Carl Worth <cworth@cworth.org> | 2006-03-13 12:20:23 -0800 |
---|---|---|
committer | Carl Worth <cworth@cworth.org> | 2006-03-13 12:20:55 -0800 |
commit | 5e399f87785ce87b2b236b199a96efc99236167f (patch) | |
tree | 6c09d75b9d556b1f734a3bdb43b4114937f97d57 | |
parent | 13b919f126427f8038cd9e76d6195494167ba503 (diff) |
cairo-clip: Fix memory leak during OOM handling.
This closes bug #6196:
Memory leak in _cairo_clip_intersect_path (src/cairo-clip.c)
https://bugs.freedesktop.org/show_bug.cgi?id=6196
(cherry picked from 79075b2cb1ce1397506fc10572df96f6fd00ecc3 commit)
-rw-r--r-- | src/cairo-clip.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/cairo-clip.c b/src/cairo-clip.c index 56fdfd007..9ab63ad8f 100644 --- a/src/cairo-clip.c +++ b/src/cairo-clip.c @@ -231,8 +231,10 @@ _cairo_clip_intersect_path (cairo_clip_t *clip, return CAIRO_STATUS_NO_MEMORY; status = _cairo_path_fixed_init_copy (&clip_path->path, path); - if (status) + if (status) { + free (clip_path); return status; + } clip_path->ref_count = 1; clip_path->fill_rule = fill_rule; |