radeonsi: Fix memory leak in si_set_constant_buffer.
authorVinson Lee <vlee@freedesktop.org>
Sun, 24 Feb 2013 01:19:24 +0000 (17:19 -0800)
committerVinson Lee <vlee@freedesktop.org>
Wed, 27 Feb 2013 04:03:11 +0000 (20:03 -0800)
Fixes resource leak defect reported by Coverity.

Signed-off-by: Vinson Lee <vlee@freedesktop.org>
Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
src/gallium/drivers/radeonsi/si_state.c

index 769ba0cc797b0c21cefe66af184613cc5bc9a9df..a395ec4f2d1ff1174afc8ad8d3626ab329c01c69 100644 (file)
@@ -2523,6 +2523,7 @@ static void si_set_constant_buffer(struct pipe_context *ctx, uint shader, uint i
 
        default:
                R600_ERR("unsupported %d\n", shader);
+               FREE(pm4);
        }
 
        if (cb->buffer != &rbuffer->b.b)