From 1060c48d46e144874ccb465a7f9ed7c6e8799c42 Mon Sep 17 00:00:00 2001 From: Alyssa Rosenzweig Date: Wed, 21 Aug 2019 08:55:05 -0700 Subject: [PATCH] pan/decode: Don't leak FBD pointer Signed-off-by: Alyssa Rosenzweig --- src/panfrost/pandecode/decode.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/panfrost/pandecode/decode.c b/src/panfrost/pandecode/decode.c index 86311268080..dee89889c2b 100644 --- a/src/panfrost/pandecode/decode.c +++ b/src/panfrost/pandecode/decode.c @@ -2580,9 +2580,11 @@ pandecode_fragment_job(const struct pandecode_mapped_memory *mem, if (fbd_dumped) pandecode_prop("framebuffer = framebuffer_%d_p | %s | 0x%X", job_no, fbd_type, extra_flags); - else - pandecode_prop("framebuffer = %s | %s | 0x%X", pointer_as_memory_reference(p), - fbd_type, extra_flags); + else { + char *a = pointer_as_memory_reference(p); + pandecode_prop("framebuffer = %s | %s | 0x%X", a, fbd_type, extra_flags); + free(a); + } pandecode_indent--; pandecode_log("};\n"); -- 2.30.2