Commit 46cba58a authored by Sebastian Lackner's avatar Sebastian Lackner Committed by Alexandre Julliard

server: Initialize table->handles immediately after creation of atom table.

When the malloc afterwards fails, release_object() is called. atom_table_destroy() assumes that table->handles was properly initialized.
parent 6955a298
......@@ -103,6 +103,7 @@ static struct atom_table *create_table(int entries_count)
{
if ((entries_count < MIN_HASH_SIZE) ||
(entries_count > MAX_HASH_SIZE)) entries_count = HASH_SIZE;
table->handles = NULL;
table->entries_count = entries_count;
if (!(table->entries = malloc( sizeof(*table->entries) * table->entries_count )))
{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment