Fix several memory leaks.
This commit is contained in:
parent
371c620d2d
commit
b4b7f05dc3
|
@ -320,11 +320,13 @@ static void key_destroy( struct object *obj )
|
||||||
free( key->values[i].name );
|
free( key->values[i].name );
|
||||||
if (key->values[i].data) free( key->values[i].data );
|
if (key->values[i].data) free( key->values[i].data );
|
||||||
}
|
}
|
||||||
|
if (key->values) free( key->values );
|
||||||
for (i = 0; i <= key->last_subkey; i++)
|
for (i = 0; i <= key->last_subkey; i++)
|
||||||
{
|
{
|
||||||
key->subkeys[i]->parent = NULL;
|
key->subkeys[i]->parent = NULL;
|
||||||
release_object( key->subkeys[i] );
|
release_object( key->subkeys[i] );
|
||||||
}
|
}
|
||||||
|
if (key->subkeys) free( key->subkeys );
|
||||||
/* unconditionally notify everything waiting on this key */
|
/* unconditionally notify everything waiting on this key */
|
||||||
while ((ptr = list_head( &key->notify_list )))
|
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 );
|
if (save_timeout_user) remove_timeout_user( save_timeout_user );
|
||||||
save_timeout_user = NULL;
|
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 );
|
release_object( root_key );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -838,7 +838,11 @@ static void set_update_region( struct window *win, struct region *region )
|
||||||
}
|
}
|
||||||
else
|
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->paint_flags &= ~(PAINT_ERASE | PAINT_NONCLIENT);
|
||||||
win->update_region = NULL;
|
win->update_region = NULL;
|
||||||
if (region) free_region( region );
|
if (region) free_region( region );
|
||||||
|
|
Loading…
Reference in New Issue