Fix a double-free bug when a window on an alternate screen queries an exec process

The 'free_it' variable was only initialised to zero at the start of the function, so when non-main screens
were processed in the later iterations of the loop, it could keep a value of 1 from the previous iteration.

We don't actually need a free_it variable at all - just use a NULL value of ptr_free to indicate that there
is nothing to free (and passing a NULL to new_free() is a no-op).

This also simplifies a test because ptr is always non-NULL (strip_ansi() never returns NULL).
This commit is contained in:
Kevin Easton
2017-02-16 23:12:38 +11:00
parent 790cb771ed
commit debfebf3a7
2 changed files with 12 additions and 15 deletions

View File

@@ -1,5 +1,8 @@
[Changes 1.2.2]
* Fix a double-free bug when a window on an alternate screen queries an exec
process. (caf)
* Use 127.0.0.1 for wserv socket, which fixes /WINDOW CREATE with IPv6. (caf)
* Allow INVITE and WALLOP floods to trigger auto-ignore. (caf)