Skip to content

Commit

Permalink
core: dns cache - test for null pointers before debug checks after re…
Browse files Browse the repository at this point in the history
…moving from list

- next/prev are set to null after remove from list by commit
  0fbcca3
  • Loading branch information
miconda committed Nov 10, 2015
1 parent d73d56b commit 70699ae
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions dns_cache.c
Expand Up @@ -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(); \
} \
Expand Down

0 comments on commit 70699ae

Please sign in to comment.