st/mesa: Fix memory leak in out-of-memory path.
authorVinson Lee <vlee@vmware.com>
Tue, 6 Dec 2011 08:15:28 +0000 (00:15 -0800)
committerVinson Lee <vlee@vmware.com>
Sat, 17 Dec 2011 01:51:41 +0000 (17:51 -0800)
Fixes Coverity resource leak defect.

Signed-off-by: Vinson Lee <vlee@vmware.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
src/mesa/state_tracker/st_atom_pixeltransfer.c

index afca609769f08426fae715341b8c7f498d24464d..fb1e4092ccb5885ec4898ccae1935acb2ba000c3 100644 (file)
@@ -266,6 +266,7 @@ get_pixel_transfer_program(struct gl_context *ctx, const struct state_key *key)
    if (!fp->Base.Instructions) {
       _mesa_error(ctx, GL_OUT_OF_MEMORY,
                   "generating pixel transfer program");
+      _mesa_free_parameter_list(params);
       return NULL;
    }