httpd: fixed duplicate NULL check

See bug #54196.

Reported-by: Andrey Vinogradov <andrey.vinogradov@teplomonitor.ru>
Signed-off-by: Simon Goldschmidt <goldsimon@gmx.de>
This commit is contained in:
Simon Goldschmidt 2018-06-27 20:53:30 +02:00
parent 0c209dba4b
commit 0610b34372

View File

@ -2495,7 +2495,7 @@ http_poll(void *arg, struct altcp_pcb *pcb)
/* If this connection has a file open, try to send some more data. If /* If this connection has a file open, try to send some more data. If
* it has not yet received a GET request, don't do this since it will * it has not yet received a GET request, don't do this since it will
* cause the connection to close immediately. */ * cause the connection to close immediately. */
if (hs && (hs->handle)) { if (hs->handle) {
LWIP_DEBUGF(HTTPD_DEBUG | LWIP_DBG_TRACE, ("http_poll: try to send more data\n")); LWIP_DEBUGF(HTTPD_DEBUG | LWIP_DBG_TRACE, ("http_poll: try to send more data\n"));
if (http_send(pcb, hs)) { if (http_send(pcb, hs)) {
/* If we wrote anything to be sent, go ahead and send it now. */ /* If we wrote anything to be sent, go ahead and send it now. */