Fix a couple of non-initialization bugs

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@748 65c4cc65-6c06-0410-ace0-fbb531ad65f3
1.0
Mark Spencer 22 years ago
parent f3475fad8c
commit 7edc592778

@ -2562,6 +2562,7 @@ static void build_route(struct sip_pvt *p, struct sip_request *req, int backward
/* If this was the first then it'll be the tail */
if (!tail) tail = thishop;
} else {
thishop->next = NULL;
/* Link in at the end */
if (tail)
tail->next = thishop;
@ -2591,6 +2592,7 @@ static void build_route(struct sip_pvt *p, struct sip_request *req, int backward
thishop = (struct sip_route *)malloc(sizeof(struct sip_route)+len+1);
strncpy(thishop->hop, c, len);
thishop->hop[len] = '\0';
thishop->next = NULL;
/* Goes at the end */
if (tail)
tail->next = thishop;

Loading…
Cancel
Save