| 197 | } |
| 198 | |
| 199 | void |
| 200 | in_pcbgroup_destroy(struct inpcbinfo *pcbinfo) |
| 201 | { |
| 202 | struct inpcbgroup *pcbgroup; |
| 203 | u_int pgn; |
| 204 | |
| 205 | if (pcbinfo->ipi_npcbgroups == 0) |
| 206 | return; |
| 207 | |
| 208 | for (pgn = 0; pgn < pcbinfo->ipi_npcbgroups; pgn++) { |
| 209 | pcbgroup = &pcbinfo->ipi_pcbgroups[pgn]; |
| 210 | KASSERT(CK_LIST_EMPTY(pcbinfo->ipi_listhead), |
| 211 | ("in_pcbinfo_destroy: listhead not empty")); |
| 212 | INP_GROUP_LOCK_DESTROY(pcbgroup); |
| 213 | hashdestroy(pcbgroup->ipg_hashbase, M_PCB, |
| 214 | pcbgroup->ipg_hashmask); |
| 215 | } |
| 216 | hashdestroy(pcbinfo->ipi_wildbase, M_PCB, pcbinfo->ipi_wildmask); |
| 217 | free(pcbinfo->ipi_pcbgroups, M_PCB); |
| 218 | pcbinfo->ipi_pcbgroups = NULL; |
| 219 | pcbinfo->ipi_npcbgroups = 0; |
| 220 | pcbinfo->ipi_hashfields = 0; |
| 221 | } |
| 222 | |
| 223 | /* |
| 224 | * Given a hash of whatever the covered tuple might be, return a pcbgroup |
no test coverage detected