From: Mark Spencer Date: Sat, 5 Apr 2003 22:33:42 +0000 (+0000) Subject: Fix a couple of non-initialization bugs X-Git-Tag: 0.4.0~90 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=7edc592778c2121b16934205ed8eaeb1981357ae;p=thirdparty%2Fasterisk.git Fix a couple of non-initialization bugs git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@748 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- diff --git a/channels/chan_sip.c b/channels/chan_sip.c index 71f2ca692e..80d103c746 100755 --- a/channels/chan_sip.c +++ b/channels/chan_sip.c @@ -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;