CID 353496: Error handling issue in lib/isc/netmgr/netmgr.c
Coverity Scan finds suspicious that isc__nm_process_sock_buffer()
's return value is not being checked in lib/isc/netmgr/netmgr.c
, it is elsewhere:
lib/isc/netmgr/netmgr.c: isc__nm_process_sock_buffer(sock);
lib/isc/netmgr/tcpdns.c: result = isc__nm_process_sock_buffer(sock);
lib/isc/netmgr/tcpdns.c: result = isc__nm_process_sock_buffer(sock);
lib/isc/netmgr/tcpdns.c: result = isc__nm_process_sock_buffer(csock);
lib/isc/netmgr/tlsdns.c: result = isc__nm_process_sock_buffer(sock);
lib/isc/netmgr/tlsdns.c: result = isc__nm_process_sock_buffer(sock);
lib/isc/netmgr/tlsdns.c: result = isc__nm_process_sock_buffer(sock);
lib/isc/netmgr/tlsdns.c: result = isc__nm_process_sock_buffer(sock);
lib/isc/netmgr/tlsdns.c: result = isc__nm_process_sock_buffer(csock);
Related commit b432d5d3.
From v9_18
:
*** CID 353496: Error handling issues (CHECKED_RETURN)
/lib/isc/netmgr/netmgr.c: 2364 in isc__nm_resume_processing()
2358 REQUIRE(!atomic_load(&sock->client));
2359
2360 if (isc__nmsocket_closing(sock)) {
2361 return;
2362 }
2363
>>> CID 353496: Error handling issues (CHECKED_RETURN)
>>> Calling "isc__nm_process_sock_buffer" without checking return value (as is done elsewhere 8 out of 9 times).
2364 isc__nm_process_sock_buffer(sock);
2365 }
2366
2367 void
2368 isc_nmhandle_cleartimeout(isc_nmhandle_t *handle) {
2369 REQUIRE(VALID_NMHANDLE(handle));