[Mesa-dev] [PATCH mesa] vc4: fix memory leak
Eric Engestrom
eric at engestrom.ch
Tue Jul 12 22:29:34 UTC 2016
The allocation has succeeded by that point, so it needs to be freed.
CovID: 1358929
Signed-off-by: Eric Engestrom <eric at engestrom.ch>
---
src/gallium/drivers/vc4/vc4_resource.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/gallium/drivers/vc4/vc4_resource.c b/src/gallium/drivers/vc4/vc4_resource.c
index aabe593..a07fa3d 100644
--- a/src/gallium/drivers/vc4/vc4_resource.c
+++ b/src/gallium/drivers/vc4/vc4_resource.c
@@ -552,7 +552,7 @@ vc4_resource_from_handle(struct pipe_screen *pscreen,
handle->stride,
expected_stride);
}
- return NULL;
+ goto fail;
}
rsc->tiled = false;
--
2.9.0
More information about the mesa-dev
mailing list