summaryrefslogtreecommitdiff
path: root/source3/include
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2001-03-20 23:29:36 +0000
committerJeremy Allison <jra@samba.org>2001-03-20 23:29:36 +0000
commit8aa5177b7c5a4ceb15cd43716b1c728146b9e1cb (patch)
treeaf40e83107dc365662d6f11951e7c1ba9188175f /source3/include
parentbeec1ea8291c9c2b12745d37ffe307dd4e3bd6ec (diff)
downloadsamba-8aa5177b7c5a4ceb15cd43716b1c728146b9e1cb.tar.gz
samba-8aa5177b7c5a4ceb15cd43716b1c728146b9e1cb.tar.bz2
samba-8aa5177b7c5a4ceb15cd43716b1c728146b9e1cb.zip
When calling DLIST_REMOVE(x,x) (from lib/interface.c) ensure that the pointer
is still valid before setting prev and next to null. Jeremy. (This used to be commit 0d2e9e4d32b038c1a71e3a625db46876294e3abf)
Diffstat (limited to 'source3/include')
-rw-r--r--source3/include/dlinklist.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/source3/include/dlinklist.h b/source3/include/dlinklist.h
index c35155d9bc..e68f2a4d86 100644
--- a/source3/include/dlinklist.h
+++ b/source3/include/dlinklist.h
@@ -47,7 +47,7 @@
if ((p)->prev) (p)->prev->next = (p)->next; \
if ((p)->next) (p)->next->prev = (p)->prev; \
} \
- (p)->next = (p)->prev = NULL; \
+ if ((p)) (p)->next = (p)->prev = NULL; \
}
/* promote an element to the top of the list */