mirror of
https://git.tartarus.org/simon/putty.git
synced 2025-01-26 01:32:25 +00: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;
|
cbhead = newhead;
|
||||||
cbtail = newtail;
|
cbtail = newtail;
|
||||||
|
if (newtail)
|
||||||
newtail->next = NULL;
|
newtail->next = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user