diff options
author | mmichelson <mmichelson@f38db490-d61c-443f-a65b-d21fe96a405b> | 2008-12-16 23:07:33 +0000 |
---|---|---|
committer | mmichelson <mmichelson@f38db490-d61c-443f-a65b-d21fe96a405b> | 2008-12-16 23:07:33 +0000 |
commit | 11b1ee371fb752f39d2bd318032c56f4fe54d8e3 (patch) | |
tree | c31a9c9ba035e9e3519cf9e4724fc69913ef80ff /channels | |
parent | f849fc9c10542079d87590ca91ceb09c4b65debe (diff) |
Merged revisions 164978 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk
................
r164978 | mmichelson | 2008-12-16 17:06:04 -0600 (Tue, 16 Dec 2008) | 15 lines
Merged revisions 164977 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4
........
r164977 | mmichelson | 2008-12-16 17:04:27 -0600 (Tue, 16 Dec 2008) | 7 lines
After looking through SIP registration code most of the day, this
is one of the few things I could find that was just plain wrong.
Even though it probably isn't possible for it to happen, it seems weird
to have code that checks if a pointer is NULL and then immediately dereferences
that pointer if it was NULL.
........
................
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.6.1@164980 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'channels')
-rw-r--r-- | channels/chan_sip.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/channels/chan_sip.c b/channels/chan_sip.c index bbe309ace..c365b8698 100644 --- a/channels/chan_sip.c +++ b/channels/chan_sip.c @@ -9805,7 +9805,9 @@ static int transmit_register(struct sip_registry *r, int sipmethod, const char * /* exit if we are already in process with this registrar ?*/ if (r == NULL || ((auth == NULL) && (r->regstate == REG_STATE_REGSENT || r->regstate == REG_STATE_AUTHSENT))) { - ast_log(LOG_NOTICE, "Strange, trying to register %s@%s when registration already pending\n", r->username, r->hostname); + if (r) { + ast_log(LOG_NOTICE, "Strange, trying to register %s@%s when registration already pending\n", r->username, r->hostname); + } return 0; } |