[Mesa-dev] [PATCH] nouveau: don't leak dec struct on error
Dave Airlie
airlied at gmail.com
Mon Sep 1 16:08:49 PDT 2014
From: Dave Airlie <airlied at redhat.com>
This one path doesn't goto fail, so it seems to leak dec.
Signed-off-by: Dave Airlie <airlied at redhat.com>
---
src/gallium/drivers/nouveau/nouveau_video.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/gallium/drivers/nouveau/nouveau_video.c b/src/gallium/drivers/nouveau/nouveau_video.c
index 8795c9d..bd04625 100644
--- a/src/gallium/drivers/nouveau/nouveau_video.c
+++ b/src/gallium/drivers/nouveau/nouveau_video.c
@@ -553,7 +553,7 @@ nouveau_create_decoder(struct pipe_context *context,
&mpeg);
if (ret < 0) {
debug_printf("Creation failed: %s (%i)\n", strerror(-ret), ret);
- return NULL;
+ goto fail;
}
dec->mpeg = mpeg;
--
1.9.3
More information about the mesa-dev
mailing list