mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-28 14:40:10 +01:00
pp: Fix memory leak on error path.
Fixes Coverity resource leak defect. Reviewed-by: José Fonseca <jfonseca@vmware.com>
This commit is contained in:
parent
faa16dc456
commit
ca1b60057a
1 changed files with 2 additions and 1 deletions
|
|
@ -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;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue