Commit 22e602de authored by Sergey Lyubka's avatar Sergey Lyubka Committed by Cesanta Bot

Check for NULL in tcp_recved_tcpip()

CL: Check for NULL in tcp_recved_tcpip()

PUBLISHED_FROM=3f5bbc2e35b79d363eac4b99a1f0d17c9b81d4ec
parent 455cec67
......@@ -15724,7 +15724,7 @@ struct tcp_recved_ctx {
void tcp_recved_tcpip(void *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,
......
......@@ -581,7 +581,7 @@ struct tcp_recved_ctx {
void tcp_recved_tcpip(void *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,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment