MCPcopy Create free account
hub / github.com/OpenSIPS/opensips / destroy_rule

Function destroy_rule

modules/dialplan/dp_db.c:725–760  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

723
724
725void 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
763dpl_id_p select_dpid(dp_connection_list_p conn, int id, int index)

Callers 3

dp_load_dbFunction · 0.85
build_ruleFunction · 0.85
destroy_hashFunction · 0.85

Calls 4

wrap_pcre_freeFunction · 0.85
repl_expr_freeFunction · 0.85
shm_freeFunction · 0.85
tmrec_expr_freeFunction · 0.85

Tested by

no test coverage detected