nouveau: don't leak dec struct on error
authorDave Airlie <airlied@redhat.com>
Mon, 1 Sep 2014 23:07:55 +0000 (09:07 +1000)
committerDave Airlie <airlied@redhat.com>
Tue, 2 Sep 2014 00:08:58 +0000 (10:08 +1000)
This one path doesn't goto fail, so it seems to leak dec.

Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu>
Signed-off-by: Dave Airlie <airlied@redhat.com>
src/gallium/drivers/nouveau/nouveau_video.c

index 8795c9d3bc2238d056ab22e0139fa906e53854ea..bd0462542f319df37bb54d527f3e373521cdb17b 100644 (file)
@@ -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;