Module: kamailio
Branch: 4.3
Commit: d260080724b8f9ec0a3c55b3cee3ce34205b814c
URL:
https://github.com/kamailio/kamailio/commit/d260080724b8f9ec0a3c55b3cee3ce3…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2015-11-16T12:00:33+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
(cherry picked from commit 70699ae8b9159c18bdd73c3092ccb19691edf0fd)
---
Modified: dns_cache.c
---
Diff:
https://github.com/kamailio/kamailio/commit/d260080724b8f9ec0a3c55b3cee3ce3…
Patch:
https://github.com/kamailio/kamailio/commit/d260080724b8f9ec0a3c55b3cee3ce3…
---
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(); \
} \