Skip to content

Commit

Permalink
core: reset avps and xavps lists in all error cases
Browse files Browse the repository at this point in the history
- just for safety when one uses some srevent routes
  • Loading branch information
miconda committed May 15, 2017
1 parent 8f4c858 commit bc336bf
Showing 1 changed file with 4 additions and 9 deletions.
13 changes: 4 additions & 9 deletions src/core/receive.c
Expand Up @@ -381,26 +381,21 @@ int receive_msg(char* buf, unsigned int len, struct receive_info* rcv_info)
error_rpl:
/* execute post reply-script callbacks */
exec_post_script_cb(msg, ONREPLY_CB_TYPE);
reset_avps();
#ifdef WITH_XAVP
xavp_reset_list();
#endif
goto error02;
#endif /* NO_ONREPLY_ROUTE_ERROR */
error_req:
LM_DBG("error:...\n");
/* execute post request-script callbacks */
exec_post_script_cb(msg, REQUEST_CB_TYPE);
error03:
/* free possible loaded avps -bogdan */
reset_avps();
#ifdef WITH_XAVP
xavp_reset_list();
#endif
error02:
free_sip_msg(msg);
pkg_free(msg);
error00:
reset_avps();
#ifdef WITH_XAVP
xavp_reset_list();
#endif
STATS_RX_DROPS;
/* reset log prefix */
log_prefix_set(NULL);
Expand Down

0 comments on commit bc336bf

Please sign in to comment.