diff options
author | Vinson Lee <vlee@freedesktop.org> | 2013-08-02 23:39:24 -0700 |
---|---|---|
committer | Vinson Lee <vlee@freedesktop.org> | 2013-08-05 17:27:38 -0700 |
commit | 8294d969e1c2154721eb34dff5848b64f4604308 (patch) | |
tree | 866617dcc734492bfedc97d126759713433a9f5f /src/gallium/auxiliary/postprocess | |
parent | a9cb914f49fa3810b15eb9df9f6209a16fafa491 (diff) | |
download | external_mesa3d-8294d969e1c2154721eb34dff5848b64f4604308.zip external_mesa3d-8294d969e1c2154721eb34dff5848b64f4604308.tar.gz external_mesa3d-8294d969e1c2154721eb34dff5848b64f4604308.tar.bz2 |
postprocess: Check ppq is null before calling pp_free_bos.
pp_free_bos dereferences ppq without a null check.
Fixes "Dereference before null check" defect reported by Coverity.
Signed-off-by: Vinson Lee <vlee@freedesktop.org>
Reviewed-by: Brian Paul <brianp@vmware.com>
Diffstat (limited to 'src/gallium/auxiliary/postprocess')
-rw-r--r-- | src/gallium/auxiliary/postprocess/pp_init.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/gallium/auxiliary/postprocess/pp_init.c b/src/gallium/auxiliary/postprocess/pp_init.c index 201a357..a49a23d 100644 --- a/src/gallium/auxiliary/postprocess/pp_init.c +++ b/src/gallium/auxiliary/postprocess/pp_init.c @@ -169,7 +169,9 @@ pp_free(struct pp_queue_t *ppq) { unsigned int i, j; - pp_free_fbos(ppq); + if (ppq) { + pp_free_fbos(ppq); + } if (ppq && ppq->p) { if (ppq->p->pipe && ppq->filters && ppq->shaders) { |