mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-09 04:38:03 +02:00
remove program from hash table when deleted (bug 979514)
This commit is contained in:
parent
a09db0a7fa
commit
c9a415663a
1 changed files with 7 additions and 8 deletions
|
|
@ -974,14 +974,13 @@ _mesa_DeletePrograms(GLsizei n, const GLuint *ids)
|
|||
ctx->Driver.DeleteProgram(ctx, prog);
|
||||
}
|
||||
}
|
||||
else {
|
||||
/* This is necessary as we can't tell from HashLookup
|
||||
* whether the entry exists with data == 0, or if it
|
||||
* doesn't exist at all. As GenPrograms creates the first
|
||||
* case below, need to call Remove() to avoid memory leak:
|
||||
*/
|
||||
_mesa_HashRemove(ctx->Shared->Programs, ids[i]);
|
||||
}
|
||||
/* Always remove entry from hash table.
|
||||
* This is necessary as we can't tell from HashLookup
|
||||
* whether the entry exists with data == 0, or if it
|
||||
* doesn't exist at all. As GenPrograms creates the first
|
||||
* case below, need to call Remove() to avoid memory leak:
|
||||
*/
|
||||
_mesa_HashRemove(ctx->Shared->Programs, ids[i]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue