mirror of
https://git.tartarus.org/simon/putty.git
synced 2025-01-25 01:02:24 +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,7 +65,8 @@ void delete_callbacks_for_context(void *ctx)
|
|||||||
|
|
||||||
cbhead = newhead;
|
cbhead = newhead;
|
||||||
cbtail = newtail;
|
cbtail = newtail;
|
||||||
newtail->next = NULL;
|
if (newtail)
|
||||||
|
newtail->next = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
void queue_toplevel_callback(toplevel_callback_fn_t fn, void *ctx)
|
void queue_toplevel_callback(toplevel_callback_fn_t fn, void *ctx)
|
||||||
|
Loading…
Reference in New Issue
Block a user