Module: sip-router
Branch: master
Commit: f7c16aaa7eacf64ba17a54720db2f9a4b58ad134
URL:
http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=f7c16aa…
Author: Marius Zbihlei <marius.zbihlei(a)1and1.ro>
Committer: Marius Zbihlei <marius.zbihlei(a)1and1.ro>
Date: Fri Jan 14 17:20:40 2011 +0200
Prevent NULL pointer dereference when rtype was incorrect
Found with clang
---
route.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/route.c b/route.c
index 46725ae..7a29ded 100644
--- a/route.c
+++ b/route.c
@@ -1754,7 +1754,7 @@ inline static int comp_ip(int op, struct ip_addr* ip, int rtype,
default:
LOG(L_CRIT, "BUG: comp_ip: invalid type for "
" src_ip or dst_ip (%d)\n", rtype);
- ret=-1;
+ return -1;
}
/* here "right" is set to the str we compare with */
r_expop.str=*right;