mirror of
https://git.tartarus.org/simon/putty.git
synced 2025-03-22 14:39:24 -05:00
Fix a newly introduced segfault in callback.c.
Colin Harrison points out that commit c31e3cd43 was less cautious than it should have been: when delete_callbacks_for_context nulls out the 'next' pointer in the new tail element of the callbacks list, it should only do so if there _is_ a new tail element. If the list has just become empty, that won't work very well!
This commit is contained in:
parent
f789251ee4
commit
6714fcddc6
@ -65,6 +65,7 @@ void delete_callbacks_for_context(void *ctx)
|
||||
|
||||
cbhead = newhead;
|
||||
cbtail = newtail;
|
||||
if (newtail)
|
||||
newtail->next = NULL;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user