Skip to content

Commit

Permalink
dialog: fix possible crash when there were undeleted routes
Browse files Browse the repository at this point in the history
  • Loading branch information
razvancrainea committed Nov 8, 2016
1 parent eb2f8a4 commit 89eb75b
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions modules/dialog/dlg_handlers.c
Expand Up @@ -2050,12 +2050,13 @@ int fix_route_dialog(struct sip_msg *req,struct dlg_cell *dlg)
buf = req->buf;

if (req->route) {
for (it=req->route;it;it=it->sibling)
for (it=req->route;it;it=it->sibling) {
if (it->parsed && ((rr_t*)it->parsed)->deleted)
continue;
if ((lmp = del_lump(req,it->name.s - buf,it->len,HDR_ROUTE_T)) == 0) {
LM_ERR("del_lump failed \n");
return -1;
if ((lmp = del_lump(req,it->name.s - buf,it->len,HDR_ROUTE_T)) == 0) {
LM_ERR("del_lump failed \n");
return -1;
}
}
}

Expand Down

0 comments on commit 89eb75b

Please sign in to comment.