Module: kamailio
Branch: master
Commit: ff2e0d96a50eadf4e872865d43f0fbe15aef18bd
URL:
https://github.com/kamailio/kamailio/commit/ff2e0d96a50eadf4e872865d43f0fbe…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2017-07-02T12:22:33+02:00
core: dns cachec- safety check in log message before abort
---
Modified: src/core/dns_cache.c
---
Diff:
https://github.com/kamailio/kamailio/commit/ff2e0d96a50eadf4e872865d43f0fbe…
Patch:
https://github.com/kamailio/kamailio/commit/ff2e0d96a50eadf4e872865d43f0fbe…
---
diff --git a/src/core/dns_cache.c b/src/core/dns_cache.c
index 3b0f5404c4..577eb48d1f 100644
--- a/src/core/dns_cache.c
+++ b/src/core/dns_cache.c
@@ -456,8 +456,10 @@ int init_dns_cache_stats(int iproc_num)
LM_CRIT("%s: crt(%p, %p, %p)," \
" prev(%p, %p, %p), next(%p, %p, %p)\n", txt, \
(l), (l)->next, (l)->prev, \
- (l)->prev, (l)->prev->next, (l)->prev->prev, \
- (l)->next, (l)->next->next, (l)->next->prev \
+ (l)->prev, ((l)->prev)?(l)->prev->next:NULL, \
+ ((l)->prev)?(l)->prev->prev:NULL, \
+ (l)->next, ((l)->next)?(l)->next->next:NULL, \
+ ((l)->next)?(l)->next->prev:NULL \
)
#define debug_lu_lst( txt, l) \