[cairo-bugs] [Bug 87766] New: memory leak in _cairo_default_context_set_source_surface
bugzilla-daemon at freedesktop.org
bugzilla-daemon at freedesktop.org
Sat Dec 27 07:10:36 PST 2014
https://bugs.freedesktop.org/show_bug.cgi?id=87766
Bug ID: 87766
Summary: memory leak in
_cairo_default_context_set_source_surface
Product: cairo
Version: unspecified
Hardware: Other
OS: All
Status: NEW
Severity: normal
Priority: medium
Component: general
Assignee: chris at chris-wilson.co.uk
Reporter: sixtysix at inwind.it
QA Contact: cairo-bugs at cairographics.org
Created attachment 111398
--> https://bugs.freedesktop.org/attachment.cgi?id=111398&action=edit
testcase
running the attached test case valgrind reports:
>==3== 160 bytes in 1 blocks are definitely lost in loss record 1 of 7
>==3== at 0x4A06BCF: malloc (in /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so)
>==3== by 0x4C645AC: _cairo_pattern_create_solid (cairo/src/cairo-pattern.c:605)
>==3== by 0x4C645EB: _cairo_pattern_create_in_error.part.20 (cairo/src/cairo-pattern.c:628)
>==3== by 0x4C3D0E4: _cairo_default_context_set_source_surface (cairo/src/cairo-default-context.c:327)
>==3== by 0x4C349EE: cairo_set_source_surface (cairo/src/cairo.c:766)
>==3== by 0x400803: main (/home/massimo/devel/tmp/test-cairo-set-source-surface.c:12)
_cairo_default_context_set_source_surface, when the surface passed in
is in error, returns a pattern->status without destroying the pattern
created which is not a static pattern nor part of a cairo owned set
of error patterns:
http://cgit.freedesktop.org/cairo/tree/src/cairo-default-context.c#n327
Similarly cairo_get_source returns a leaked pattern when the context
passed in is in error:
http://cgit.freedesktop.org/cairo/tree/src/cairo.c#n833
Valgrind reports this one running:
CAIRO_TEST_TARGET=image valgrind --leak-check=full .libs/cairo-test-suite -f
api-special-cases
--
You are receiving this mail because:
You are the QA Contact for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.cairographics.org/archives/cairo-bugs/attachments/20141227/955d1338/attachment.html>
More information about the cairo-bugs
mailing list