Skip to content

Commit

Permalink
core: safety check for linker when inserting xavp with index
Browse files Browse the repository at this point in the history
(cherry picked from commit ec438b4)
  • Loading branch information
miconda committed May 19, 2015
1 parent b8268af commit cd42ec0
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions xavp.c
Expand Up @@ -733,6 +733,10 @@ int xavp_insert(sr_xavp_t *xavp, int idx, sr_xavp_t **list)
lst = crt;
}

if(lst==NULL) {
LM_ERR("cannot link the xavp\n");
return -1;
}
xavp->next = lst->next;
lst->next = xavp;

Expand Down

0 comments on commit cd42ec0

Please sign in to comment.