win: free window resource

It's fine to call free_win_res in the new backends too.

Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
This commit is contained in:
Yuxuan Shui 2019-03-17 01:06:58 +00:00
parent 838a214749
commit b32ae5a32c
No known key found for this signature in database
GPG Key ID: 37C999F617EA1A47
1 changed files with 1 additions and 3 deletions

View File

@ -1458,9 +1458,7 @@ static void finish_destroy_win(session_t *ps, win **_w) {
ps->active_win = NULL; ps->active_win = NULL;
} }
if (!ps->o.experimental_backends) {
free_win_res(ps, w); free_win_res(ps, w);
}
// Drop w from all prev_trans to avoid accessing freed memory in // Drop w from all prev_trans to avoid accessing freed memory in
// repair_win() // repair_win()