[Mesa-dev] [PATCH] st/mesa: Fix memory leak in out-of-memory path.

Vinson Lee vlee at vmware.com
Fri Dec 16 06:46:38 PST 2011


Fixes Coverity resource leak defect.

Signed-off-by: Vinson Lee <vlee at vmware.com>
---
 src/mesa/state_tracker/st_atom_pixeltransfer.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/src/mesa/state_tracker/st_atom_pixeltransfer.c b/src/mesa/state_tracker/st_atom_pixeltransfer.c
index afca609..fb1e409 100644
--- a/src/mesa/state_tracker/st_atom_pixeltransfer.c
+++ b/src/mesa/state_tracker/st_atom_pixeltransfer.c
@@ -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;
    }
 
-- 
1.7.7.3



More information about the mesa-dev mailing list