mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-09 08:58:02 +02:00
mesa: Test for failed malloc in _mesa_HashInsert.
Signed-off-by: Brian Paul <brianp@vmware.com>
This commit is contained in:
parent
af2023e31c
commit
7c7247ddbf
1 changed files with 6 additions and 4 deletions
|
|
@ -191,10 +191,12 @@ _mesa_HashInsert(struct _mesa_HashTable *table, GLuint key, void *data)
|
|||
|
||||
/* alloc and insert new table entry */
|
||||
entry = MALLOC_STRUCT(HashEntry);
|
||||
entry->Key = key;
|
||||
entry->Data = data;
|
||||
entry->Next = table->Table[pos];
|
||||
table->Table[pos] = entry;
|
||||
if (entry) {
|
||||
entry->Key = key;
|
||||
entry->Data = data;
|
||||
entry->Next = table->Table[pos];
|
||||
table->Table[pos] = entry;
|
||||
}
|
||||
|
||||
_glthread_UNLOCK_MUTEX(table->Mutex);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue