summaryrefslogtreecommitdiffstats
path: root/src/gallium
diff options
context:
space:
mode:
authorErnestas Kulik <[email protected]>2018-08-30 19:02:46 +0300
committerEric Anholt <[email protected]>2019-01-29 16:14:13 -0800
commit90458bef544ac46a912f06e73f71c3cb20fdaaf6 (patch)
tree2ab995e7d17e00039617dc266e01f6520cfcf8c9 /src/gallium
parentf6e49d5ad0fde19a074644491475470d684dd721 (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 <[email protected]> Fixes: 45bb8f295710 ("broadcom: Add V3D 3.3 gallium driver called "vc5", for BCM7268.")
Diffstat (limited to 'src/gallium')
-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 21c68942e14..84e86799d5e 100644
--- a/src/gallium/drivers/v3d/v3d_resource.c
+++ b/src/gallium/drivers/v3d/v3d_resource.c
@@ -780,7 +780,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;