| 313 | } |
| 314 | |
| 315 | int |
| 316 | del_tree( |
| 317 | ptree_t* t, |
| 318 | osips_free_f free_f |
| 319 | ) |
| 320 | { |
| 321 | int i,j; |
| 322 | if(NULL == t) |
| 323 | goto exit; |
| 324 | /* delete all the children */ |
| 325 | for(i=0; i< ptree_children; i++) { |
| 326 | /* shm_free the rg array of rt_info */ |
| 327 | if(NULL!=t->ptnode[i].rg) { |
| 328 | for(j=0;j<t->ptnode[i].rg_pos;j++) { |
| 329 | /* if non intermediate delete the routing info */ |
| 330 | if(t->ptnode[i].rg[j].rtlw !=NULL) |
| 331 | del_rt_list(t->ptnode[i].rg[j].rtlw, free_f); |
| 332 | } |
| 333 | func_free(free_f, t->ptnode[i].rg); |
| 334 | } |
| 335 | /* if non leaf delete all the children */ |
| 336 | if(t->ptnode[i].next != NULL) |
| 337 | del_tree(t->ptnode[i].next, free_f); |
| 338 | } |
| 339 | func_free(free_f, t); |
| 340 | exit: |
| 341 | return 0; |
| 342 | } |
| 343 | |
| 344 | void |
| 345 | del_rt_list( |
no test coverage detected