mirror of
https://github.com/cesanta/mongoose.git
synced 2025-01-21 01:13:43 +08:00
Extra NULL check in iter2(). Fix #430
This commit is contained in:
parent
632b3a38a9
commit
9981b99ac8
@ -5209,7 +5209,7 @@ static void iter2(struct ns_connection *nc, int ev, void *param) {
|
||||
(void) ev;
|
||||
|
||||
//DBG(("%p [%s]", conn, msg));
|
||||
if (sscanf(msg, "%p %n", &func, &n) && func != NULL) {
|
||||
if (sscanf(msg, "%p %n", &func, &n) && func != NULL && conn != NULL) {
|
||||
conn->mg_conn.callback_param = (void *) (msg + n);
|
||||
func(&conn->mg_conn, MG_POLL);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user