mirror of
https://github.com/openbsd/src.git
synced 2026-04-15 01:34:03 +00:00
Another check for partially initialized control client, from Matt
Koscica in GitHub issue 5004.
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
/* $OpenBSD: control.c,v 1.52 2026/03/09 14:33:55 nicm Exp $ */
|
||||
/* $OpenBSD: control.c,v 1.53 2026/04/14 08:32:30 nicm Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 2012 Nicholas Marriott <nicholas.marriott@gmail.com>
|
||||
@@ -829,6 +829,9 @@ control_stop(struct client *c)
|
||||
struct control_block *cb, *cb1;
|
||||
struct control_sub *csub, *csub1;
|
||||
|
||||
if (cs == NULL)
|
||||
return;
|
||||
|
||||
if (~c->flags & CLIENT_CONTROLCONTROL)
|
||||
bufferevent_free(cs->write_event);
|
||||
bufferevent_free(cs->read_event);
|
||||
@@ -842,6 +845,7 @@ control_stop(struct client *c)
|
||||
control_free_block(cs, cb);
|
||||
control_reset_offsets(c);
|
||||
|
||||
c->control_state = NULL;
|
||||
free(cs);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user