Check for NULL in tcp_recved_tcpip()

CL: Check for NULL in tcp_recved_tcpip()

PUBLISHED_FROM=3f5bbc2e35b79d363eac4b99a1f0d17c9b81d4ec
This commit is contained in:
Sergey Lyubka 2018-12-21 12:50:52 +00:00 committed by Cesanta Bot
parent 455cec67a5
commit 22e602debb
2 changed files with 2 additions and 2 deletions

View File

@ -15724,7 +15724,7 @@ struct tcp_recved_ctx {
void tcp_recved_tcpip(void *arg) { void tcp_recved_tcpip(void *arg) {
struct tcp_recved_ctx *ctx = (struct tcp_recved_ctx *) arg; struct tcp_recved_ctx *ctx = (struct tcp_recved_ctx *) arg;
tcp_recved(ctx->tpcb, ctx->len); if (ctx->tpcb != NULL) tcp_recved(ctx->tpcb, ctx->len);
} }
static int mg_lwip_if_tcp_recv(struct mg_connection *nc, void *buf, static int mg_lwip_if_tcp_recv(struct mg_connection *nc, void *buf,

View File

@ -581,7 +581,7 @@ struct tcp_recved_ctx {
void tcp_recved_tcpip(void *arg) { void tcp_recved_tcpip(void *arg) {
struct tcp_recved_ctx *ctx = (struct tcp_recved_ctx *) arg; struct tcp_recved_ctx *ctx = (struct tcp_recved_ctx *) arg;
tcp_recved(ctx->tpcb, ctx->len); if (ctx->tpcb != NULL) tcp_recved(ctx->tpcb, ctx->len);
} }
static int mg_lwip_if_tcp_recv(struct mg_connection *nc, void *buf, static int mg_lwip_if_tcp_recv(struct mg_connection *nc, void *buf,