nouveau: fix frees in unsupported IR error paths.

This is pointless in that we won't ever hit those paths in real life,
but coverity complains.

Fixes: f014ae3c7c ("nouveau: add support for nir")
Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu>
This commit is contained in:
Dave Airlie 2019-06-19 07:10:13 +10:00
parent ad284f794c
commit 93ba356544
4 changed files with 6 additions and 0 deletions

View file

@ -346,6 +346,7 @@ nv50_program_translate(struct nv50_program *prog, uint16_t chipset,
break;
default:
assert(!"unsupported IR!");
free(info);
return false;
}

View file

@ -768,6 +768,7 @@ nv50_sp_state_create(struct pipe_context *pipe,
break;
default:
assert(!"unsupported IR!");
free(prog);
return NULL;
}
@ -864,6 +865,7 @@ nv50_cp_state_create(struct pipe_context *pipe,
break;
default:
assert(!"unsupported IR!");
free(prog);
return NULL;
}

View file

@ -594,6 +594,7 @@ nvc0_program_translate(struct nvc0_program *prog, uint16_t chipset,
break;
default:
assert(!"unsupported IR!");
free(info);
return false;
}

View file

@ -607,6 +607,7 @@ nvc0_sp_state_create(struct pipe_context *pipe,
break;
default:
assert(!"unsupported IR!");
free(prog);
return NULL;
}
@ -739,6 +740,7 @@ nvc0_cp_state_create(struct pipe_context *pipe,
break;
default:
assert(!"unsupported IR!");
free(prog);
return NULL;
}