Module: kamailio
Branch: master
Commit: 70699ae8b9159c18bdd73c3092ccb19691edf0fd
URL:
https://github.com/kamailio/kamailio/commit/70699ae8b9159c18bdd73c3092ccb19…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2015-11-10T10:08:20+01:00
core: dns cache - test for null pointers before debug checks after removing from list
- next/prev are set to null after remove from list by commit
0fbcca38574139f1cd8ba7506ee5e204be5f2da7
---
Modified: dns_cache.c
---
Diff:
https://github.com/kamailio/kamailio/commit/70699ae8b9159c18bdd73c3092ccb19…
Patch:
https://github.com/kamailio/kamailio/commit/70699ae8b9159c18bdd73c3092ccb19…
---
diff --git a/dns_cache.c b/dns_cache.c
index cb2d5be..21b780e 100644
--- a/dns_cache.c
+++ b/dns_cache.c
@@ -459,15 +459,15 @@ int init_dns_cache_stats(int iproc_num)
#define debug_lu_lst( txt, l) \
do{ \
- if (check_lu_lst((l))){ \
+ if ((l) && check_lu_lst((l))){ \
dbg_lu_lst(txt " crt:", (l)); \
abort(); \
} \
- if (check_lu_lst((l)->next)){ \
+ if (((l)->next) && check_lu_lst((l)->next)){ \
dbg_lu_lst(txt " next:", (l)); \
abort(); \
} \
- if (check_lu_lst((l)->prev)){ \
+ if (((l)->prev) && check_lu_lst((l)->prev)){ \
dbg_lu_lst(txt " prev:", (l)); \
abort(); \
} \