summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorErnestas Kulik <ernestas.kulik@gmail.com>2018-08-30 19:02:46 +0300
committerEmil Velikov <emil.l.velikov@gmail.com>2019-02-12 12:53:12 +0000
commite0eba40ae465e02b5676e57ac90fa58bcf386479 (patch)
tree0a64268b6c9acab1a276f96565e356c9479d3fd5
parent1a2b227fce65a3d25766f82ec176ef4b9ed16f94 (diff)
v3d: Fix leak in resource setup error path
Reported by Coverity: in the case of unsupported modifier request, the code does not jump to the “fail” label to destroy the acquired resource. CID: 1435704 Signed-off-by: Ernestas Kulik <ernestas.kulik@gmail.com> Fixes: 45bb8f295710 ("broadcom: Add V3D 3.3 gallium driver called "vc5", for BCM7268.") (cherry picked from commit 90458bef544ac46a912f06e73f71c3cb20fdaaf6)
-rw-r--r--src/gallium/drivers/v3d/v3d_resource.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/gallium/drivers/v3d/v3d_resource.c b/src/gallium/drivers/v3d/v3d_resource.c
index dd0db8cfd89..d13fc647171 100644
--- a/src/gallium/drivers/v3d/v3d_resource.c
+++ b/src/gallium/drivers/v3d/v3d_resource.c
@@ -669,7 +669,7 @@ v3d_resource_create_with_modifiers(struct pipe_screen *pscreen,
rsc->tiled = false;
} else {
fprintf(stderr, "Unsupported modifier requested\n");
- return NULL;
+ goto fail;
}
rsc->internal_format = prsc->format;