nv50: don't leak heap on tls alloc failure
Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
This commit is contained in:
parent
18d97a8df7
commit
3f264e16e2
|
@ -405,8 +405,10 @@ nv50_program_upload_code(struct nv50_context *nv50, struct nv50_program *prog)
|
|||
prog->code_base = prog->mem->start;
|
||||
|
||||
ret = nv50_tls_realloc(nv50->screen, prog->tls_space);
|
||||
if (ret < 0)
|
||||
if (ret < 0) {
|
||||
nouveau_heap_free(&prog->mem);
|
||||
return FALSE;
|
||||
}
|
||||
if (ret > 0)
|
||||
nv50->state.new_tls_space = TRUE;
|
||||
|
||||
|
|
Loading…
Reference in New Issue