frontends/va: Fix leak when destroying VAEncCodedBufferType

Fixes: be4287c3aa ("pipe: Extend get_feedback with additional metadata")
Reviewed-by: Sil Vilerino <sivileri@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29217>
(cherry picked from commit cc03f2ea5a)
This commit is contained in:
David Rosca 2024-05-15 13:29:46 +02:00 committed by Eric Engestrom
parent 6b55807c40
commit 55d807d3ec
2 changed files with 2 additions and 2 deletions

View file

@ -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

View file

@ -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;