| 723 | |
| 724 | |
| 725 | void destroy_rule(dpl_node_t * rule){ |
| 726 | |
| 727 | if(!rule) |
| 728 | return; |
| 729 | |
| 730 | LM_DBG("destroying rule with priority %i\n", |
| 731 | rule->pr); |
| 732 | |
| 733 | if(rule->match_comp) |
| 734 | wrap_pcre_free(rule->match_comp); |
| 735 | |
| 736 | if(rule->subst_comp) |
| 737 | wrap_pcre_free(rule->subst_comp); |
| 738 | |
| 739 | /*destroy repl_exp*/ |
| 740 | if(rule->repl_comp) |
| 741 | repl_expr_free(rule->repl_comp); |
| 742 | |
| 743 | if(rule->match_exp.s) |
| 744 | shm_free(rule->match_exp.s); |
| 745 | |
| 746 | if(rule->subst_exp.s) |
| 747 | shm_free(rule->subst_exp.s); |
| 748 | |
| 749 | if(rule->repl_exp.s) |
| 750 | shm_free(rule->repl_exp.s); |
| 751 | |
| 752 | if(rule->attrs.s) |
| 753 | shm_free(rule->attrs.s); |
| 754 | |
| 755 | if(rule->timerec.s) |
| 756 | shm_free(rule->timerec.s); |
| 757 | |
| 758 | if(rule->parsed_timerec) |
| 759 | tmrec_expr_free(rule->parsed_timerec); |
| 760 | } |
| 761 | |
| 762 | |
| 763 | dpl_id_p select_dpid(dp_connection_list_p conn, int id, int index) |
no test coverage detected