queue was referenced before initialization in first goto memerr branch code. Replaced goto branch by its minimal equivalent error handling code.

This commit is contained in:
likewise 2005-02-04 13:28:50 +00:00
parent 8579e4144f
commit 3160488352

View File

@ -148,7 +148,8 @@ tcp_enqueue(struct tcp_pcb *pcb, void *arg, u16_t len,
queuelen = pcb->snd_queuelen;
if (queuelen >= TCP_SND_QUEUELEN) {
LWIP_DEBUGF(TCP_OUTPUT_DEBUG | 3, ("tcp_enqueue: too long queue %u (max %u)\n", queuelen, TCP_SND_QUEUELEN));
goto memerr;
TCP_STATS_INC(tcp.memerr);
return ERR_MEM;
}
if (queuelen != 0) {
LWIP_ASSERT("tcp_enqueue: pbufs on queue => at least one queue non-empty",
@ -352,7 +353,7 @@ tcp_enqueue(struct tcp_pcb *pcb, void *arg, u16_t len,
}
return ERR_OK;
memerr:
memerr:
TCP_STATS_INC(tcp.memerr);
if (queue != NULL) {