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>
This commit is contained in:
Vinson Lee 2013-08-02 23:39:24 -07:00
parent a9cb914f49
commit 8294d969e1

View file

@ -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) {