diff options
author | Vinson Lee <[email protected]> | 2011-10-24 14:45:39 -0700 |
---|---|---|
committer | Vinson Lee <[email protected]> | 2011-10-25 07:38:53 -0700 |
commit | ca1b60057aaf7f10f9cdbdbcd75cf3f53c751d64 (patch) | |
tree | d160094c08b1514a43d0c541819475568e424d46 /src/gallium/auxiliary/postprocess/pp_program.c | |
parent | faa16dc456f1f910eef24eaa23889be806b513b7 (diff) |
pp: Fix memory leak on error path.
Fixes Coverity resource leak defect.
Reviewed-by: José Fonseca <[email protected]>
Diffstat (limited to 'src/gallium/auxiliary/postprocess/pp_program.c')
-rw-r--r-- | src/gallium/auxiliary/postprocess/pp_program.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/gallium/auxiliary/postprocess/pp_program.c b/src/gallium/auxiliary/postprocess/pp_program.c index c287af5cf00..1a8a584b515 100644 --- a/src/gallium/auxiliary/postprocess/pp_program.c +++ b/src/gallium/auxiliary/postprocess/pp_program.c @@ -41,12 +41,13 @@ struct program * pp_init_prog(struct pp_queue_t *ppq, struct pipe_screen *pscreen) { - struct program *p = CALLOC(1, sizeof(struct program)); + struct program *p; pp_debug("Initializing program\n"); if (!pscreen) return NULL; + p = CALLOC(1, sizeof(struct program)); if (!p) return NULL; |