[PATCH] render: Fix leak of filter params
Ángel González
ingenit at zoho.com
Mon Jan 27 12:29:05 PST 2014
On 27/01/14 10:44, Chris Wilson wrote:
> ==11097== 2,048 (+1,640) bytes in 32 (+26) blocks are definitely lost in loss record 1,570 of 1,719
> ==11097== at 0x4C2A2DB: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
> ==11097== by 0x225EF3: SetPicturePictFilter (filter.c:339)
> ==11097== by 0x22DF4F: ProcRenderSetPictureFilter (render.c:1773)
> ==11097== by 0x15D25D: Dispatch (dispatch.c:432)
> ==11097== by 0x14C7B9: main (main.c:298)
>
> Signed-off-by: Chris Wilson<chris at chris-wilson.co.uk>
> ---
> render/picture.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/render/picture.c b/render/picture.c
> index 7da9310..92176fa 100644
> --- a/render/picture.c
> +++ b/render/picture.c
> @@ -1441,6 +1441,7 @@ FreePicture(void *value, XID pid)
>
> if (--pPicture->refcnt == 0) {
> free(pPicture->transform);
> + free(pPicture->filter_params);
>
> if (pPicture->pSourcePict) {
> if (pPicture->pSourcePict->type != SourcePictTypeSolidFill)
free() is added with tab indentation, but from the diff context,
surrounding code seem to use spaces.
More information about the xorg-devel
mailing list