r300g: Fix memory leak on error path.
authorVinson Lee <vlee@vmware.com>
Wed, 5 May 2010 05:55:00 +0000 (22:55 -0700)
committerVinson Lee <vlee@vmware.com>
Wed, 5 May 2010 05:55:00 +0000 (22:55 -0700)
src/gallium/drivers/r300/r300_texture.c

index a6f65fce2161519d0ee84d717ae10e7f803d3ea1..a2fefde3529858bd2fde0fedd6db4163be06896f 100644 (file)
@@ -925,6 +925,7 @@ struct pipe_resource* r300_texture_create(struct pipe_screen* screen,
         fprintf(stderr, "r300: texture_create: "
                 "Got invalid texture dimensions: %ix%ix%i\n",
                 base->width0, base->height0, base->depth0);
+        FREE(tex);
         return NULL;
     }