summaryrefslogtreecommitdiff
path: root/netcon
diff options
context:
space:
mode:
authorJoseph Henry <josephjah@gmail.com>2016-01-18 12:26:40 -0800
committerJoseph Henry <josephjah@gmail.com>2016-01-18 12:26:40 -0800
commitf2cc14481163484d3d33e320ef180b65700ff8ea (patch)
tree25bd297cd188e6c3f0e05ec2be09d2c5f3721dbd /netcon
parent1783867f9692a4eb5ad18fb534a397f23a9d95c5 (diff)
downloadinfinitytier-f2cc14481163484d3d33e320ef180b65700ff8ea.tar.gz
infinitytier-f2cc14481163484d3d33e320ef180b65700ff8ea.zip
Fixed nc_sent possible bad ptr on close issue
Diffstat (limited to 'netcon')
-rw-r--r--netcon/NetconEthernetTap.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/netcon/NetconEthernetTap.cpp b/netcon/NetconEthernetTap.cpp
index 00c0f42a..9c88737f 100644
--- a/netcon/NetconEthernetTap.cpp
+++ b/netcon/NetconEthernetTap.cpp
@@ -804,7 +804,7 @@ err_t NetconEthernetTap::nc_poll(void* arg, struct tcp_pcb *PCB)
err_t NetconEthernetTap::nc_sent(void* arg, struct tcp_pcb *PCB, u16_t len)
{
Larg *l = (Larg*)arg;
- if(len) {
+ if(l->conn && len) {
float max = (float)DEFAULT_BUF_SZ;
if(l->conn->txsz < max / 2) {
l->tap->_phy.setNotifyReadable(l->conn->sock, true);