* Destroy a dialog state */
| 645 | * Destroy a dialog state |
| 646 | */ |
| 647 | void free_dlg(dlg_t* _d) |
| 648 | { |
| 649 | if (!_d) return; |
| 650 | |
| 651 | if (_d->id.call_id.s) shm_free(_d->id.call_id.s); |
| 652 | if (_d->id.rem_tag.s) shm_free(_d->id.rem_tag.s); |
| 653 | if (_d->id.loc_tag.s) shm_free(_d->id.loc_tag.s); |
| 654 | |
| 655 | if (_d->loc_uri.s) shm_free(_d->loc_uri.s); |
| 656 | if (_d->rem_uri.s) shm_free(_d->rem_uri.s); |
| 657 | if (_d->rem_target.s) shm_free(_d->rem_target.s); |
| 658 | |
| 659 | if (_d->loc_dname.s) shm_free(_d->loc_dname.s); |
| 660 | if (_d->rem_dname.s) shm_free(_d->rem_dname.s); |
| 661 | |
| 662 | /* Free all routes in the route set */ |
| 663 | shm_free_rr(&_d->route_set); |
| 664 | shm_free(_d); |
| 665 | } |
| 666 | |
| 667 | |
| 668 | /* |
no test coverage detected