Skip to content

Commit

Permalink
core: kemi - break when matching the header name
Browse files Browse the repository at this point in the history
  • Loading branch information
miconda committed Dec 8, 2017
1 parent 2fe0724 commit 4dca6d5
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/core/kemi.c
Original file line number Diff line number Diff line change
Expand Up @@ -938,6 +938,7 @@ static int sr_kemi_hdr_append_after(sip_msg_t *msg, str *txt, str *hname)
if (cmp_hdrname_str(&hf->name, &hfm.name)!=0)
continue;
}
break;
}

hdr = (char*)pkg_malloc(txt->len);
Expand Down Expand Up @@ -1129,9 +1130,9 @@ static int sr_kemi_hdr_insert_before(sip_msg_t *msg, str *txt, str *hname)
if (cmp_hdrname_str(&hf->name, &hfm.name)!=0)
continue;
}
break;
}

hf = msg->headers;
hdr = (char*)pkg_malloc(txt->len);
if(hdr==NULL) {
LM_ERR("no pkg memory left\n");
Expand Down

0 comments on commit 4dca6d5

Please sign in to comment.