Mesa (master): nouveau: don't leak dec struct on error

Dave Airlie airlied at kemper.freedesktop.org
Tue Sep 2 00:09:27 UTC 2014


Module: Mesa
Branch: master
Commit: 19f6e80a1eaf055b13ba744d5e18af8c2984cc1d
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=19f6e80a1eaf055b13ba744d5e18af8c2984cc1d

Author: Dave Airlie <airlied at redhat.com>
Date:   Tue Sep  2 09:07:55 2014 +1000

nouveau: don't leak dec struct on error

This one path doesn't goto fail, so it seems to leak dec.

Reviewed-by: Ilia Mirkin <imirkin at alum.mit.edu>
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;




More information about the mesa-commit mailing list