Skip to content

Commit

Permalink
avp: return in case of error in avp select
Browse files Browse the repository at this point in the history
(cherry picked from commit 9a6182f)
  • Loading branch information
miconda committed Aug 30, 2017
1 parent 15de3bb commit cd43bb0
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/modules/avp/avp.c
Expand Up @@ -1596,7 +1596,7 @@ static int select_attr_fixup(str* res, select_t* s, struct sip_msg* msg)

if (! msg) { /* fixup call */
str attr_name;

if (s->params[SEL_PARAM_IDX].type != SEL_PARAM_STR) {
ERR("attribute name expected.\n");
return -1;
Expand All @@ -1619,6 +1619,7 @@ static int select_attr_fixup(str* res, select_t* s, struct sip_msg* msg)
if (parse_avp_ident(&attr_name, avp_ident) < 0) {
ERR("failed to parse attribute name: `%.*s'.\n", STR_FMT(&attr_name));
pkg_free(avp_ident);
return -1;
}
s->params[SEL_PARAM_IDX].v.p = avp_ident;
s->params[SEL_PARAM_IDX].type = SEL_PARAM_PTR;
Expand Down

0 comments on commit cd43bb0

Please sign in to comment.