Commit b4b7f05d authored by Rob Shearman's avatar Rob Shearman Committed by Alexandre Julliard

Fix several memory leaks.

parent 371c620d
......@@ -320,11 +320,13 @@ static void key_destroy( struct object *obj )
free( key->values[i].name );
if (key->values[i].data) free( key->values[i].data );
}
if (key->values) free( key->values );
for (i = 0; i <= key->last_subkey; i++)
{
key->subkeys[i]->parent = NULL;
release_object( key->subkeys[i] );
}
if (key->subkeys) free( key->subkeys );
/* unconditionally notify everything waiting on this key */
while ((ptr = list_head( &key->notify_list )))
{
......@@ -1671,7 +1673,11 @@ void close_registry(void)
if (save_timeout_user) remove_timeout_user( save_timeout_user );
save_timeout_user = NULL;
for (i = 0; i < save_branch_count; i++) release_object( save_branch_info[i].key );
for (i = 0; i < save_branch_count; i++)
{
release_object( save_branch_info[i].key );
free( save_branch_info[i].path );
}
release_object( root_key );
}
......
......@@ -838,7 +838,11 @@ static void set_update_region( struct window *win, struct region *region )
}
else
{
if (win->update_region) inc_window_paint_count( win, -1 );
if (win->update_region)
{
inc_window_paint_count( win, -1 );
free_region( win->update_region );
}
win->paint_flags &= ~(PAINT_ERASE | PAINT_NONCLIENT);
win->update_region = NULL;
if (region) free_region( region );
......
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