From 55d807d3ec6c20368f6429c0363355c6e1a0463f Mon Sep 17 00:00:00 2001 From: David Rosca Date: Wed, 15 May 2024 13:29:46 +0200 Subject: [PATCH] frontends/va: Fix leak when destroying VAEncCodedBufferType Fixes: be4287c3aa0 ("pipe: Extend get_feedback with additional metadata") Reviewed-by: Sil Vilerino Part-of: (cherry picked from commit cc03f2ea5a414d5153a9d89ed017b79d3970e4e4) --- .pick_status.json | 2 +- src/gallium/frontends/va/buffer.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.pick_status.json b/.pick_status.json index db42a2119b8..5ec328e4760 100644 --- a/.pick_status.json +++ b/.pick_status.json @@ -2534,7 +2534,7 @@ "description": "frontends/va: Fix leak when destroying VAEncCodedBufferType", "nominated": true, "nomination_type": 1, - "resolution": 0, + "resolution": 1, "main_sha": null, "because_sha": "be4287c3aa06b7f22ba83696108759f5fcd58323", "notes": null diff --git a/src/gallium/frontends/va/buffer.c b/src/gallium/frontends/va/buffer.c index bbe0c75f23e..c11cead3802 100644 --- a/src/gallium/frontends/va/buffer.c +++ b/src/gallium/frontends/va/buffer.c @@ -316,7 +316,7 @@ vlVaDestroyBuffer(VADriverContextP ctx, VABufferID buf_id) if (buf->type == VAEncCodedBufferType) { VACodedBufferSegment* node = buf->data; - while(!node) { + while (node) { VACodedBufferSegment* next = (VACodedBufferSegment*) node->next; FREE(node); node = next;