mirror of
https://git.savannah.nongnu.org/git/lwip.git
synced 2026-08-10 09:33:44 +08:00
Try to fix issues reported by coverity
This commit is contained in:
@@ -1728,7 +1728,11 @@ http_post_rxpbuf(struct http_state *hs, struct pbuf *p)
|
||||
/* prevent connection being closed if httpd_post_data_recved() is called nested */
|
||||
hs->unrecved_bytes++;
|
||||
#endif
|
||||
err = httpd_post_receive_data(hs, p);
|
||||
if (p != NULL) {
|
||||
err = httpd_post_receive_data(hs, p);
|
||||
} else {
|
||||
err = ERR_OK;
|
||||
}
|
||||
#if LWIP_HTTPD_SUPPORT_POST && LWIP_HTTPD_POST_MANUAL_WND
|
||||
hs->unrecved_bytes--;
|
||||
#endif
|
||||
|
||||
@@ -763,6 +763,7 @@ static int checkSsiByFilelist(const char* filename_listfile)
|
||||
fclose(f);
|
||||
if ((readcount > fsize) || !readcount) {
|
||||
printf("failed to read data from ssi file\n");
|
||||
free(buf);
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -780,6 +781,7 @@ static int checkSsiByFilelist(const char* filename_listfile)
|
||||
lines = (char**)malloc(sizeof(char*) * num_lines);
|
||||
if (!lines) {
|
||||
printf("failed to allocate ssi line buffer\n");
|
||||
free(buf);
|
||||
return 0;
|
||||
}
|
||||
memset(lines, 0, sizeof(char*) * num_lines);
|
||||
|
||||
Reference in New Issue
Block a user