nv30: Fix memory leak.
authorVinson Lee <vlee@freedesktop.org>
Sun, 3 Feb 2013 04:35:29 +0000 (20:35 -0800)
committerVinson Lee <vlee@freedesktop.org>
Fri, 8 Feb 2013 05:45:01 +0000 (21:45 -0800)
Fixes resource leak defect reported by Coverity.

Signed-off-by: Vinson Lee <vlee@freedesktop.org>
Reviewed-by: Brian Paul <brianp@vmware.com>
src/gallium/drivers/nv30/nv30_screen.c

index caa5f8f64db81b7b133d53a0d21e75966e1a0406..90c367280d4aa87f2ddac9ee4e0fd91ef4add480 100644 (file)
@@ -359,6 +359,7 @@ nv30_screen_create(struct nouveau_device *dev)
 
    if (!oclass) {
       NOUVEAU_ERR("unknown 3d class for 0x%02x\n", dev->chipset);
+      FREE(screen);
       return NULL;
    }