Don't overwrite last byte of the window structure as we might not have

allocated the memory for it if extrabytes was 0.
This commit is contained in:
Robert Shearman 2005-02-08 12:07:48 +00:00 committed by Alexandre Julliard
parent c587796064
commit 04995ce90d
1 changed files with 1 additions and 1 deletions

View File

@ -300,7 +300,7 @@ static void destroy_window( struct window *win )
if (win->update_region) free_region( win->update_region );
release_class( win->class );
if (win->text) free( win->text );
memset( win, 0x55, sizeof(*win) );
memset( win, 0x55, sizeof(*win) + win->nb_extra_bytes - 1 );
free( win );
}