CID 306652: Null pointer dereferences (REVERSE_INULL)
This was reported today for v9_11
. Last Coverity run was executed on Monday, so this is very recent defect:
1 new defect(s) introduced to bind-v9_11 found with Coverity Scan.
New defect(s) Reported-by: Coverity Scan
Showing 1 of 1 defect(s)
** CID 306652: Null pointer dereferences (REVERSE_INULL)
/lib/isc/unix/socket.c: 4969 in isc__socketmgr_destroy()
*** CID 306652: Null pointer dereferences (REVERSE_INULL)
/lib/isc/unix/socket.c: 4969 in isc__socketmgr_destroy()
4963 isc_mem_put(manager->mctx, manager->fdstate,
4964 manager->maxsocks * sizeof(int));
4965
4966 if (manager->stats != NULL)
4967 isc_stats_detach(&manager->stats);
4968
>>> CID 306652: Null pointer dereferences (REVERSE_INULL)
>>> Null-checking "manager->fdlock" suggests that it may be null, but it has already been dereferenced on all paths leading to the check.
4969 if (manager->fdlock != NULL) {
4970 for (i = 0; i < FDLOCK_COUNT; i++)
4971 DESTROYLOCK(&manager->fdlock[i]);
4972 isc_mem_put(manager->mctx, manager->fdlock,
4973 FDLOCK_COUNT * sizeof(isc_mutex_t));
4974 }
Edited by Michal Nowak