git.samba.org
/
samba.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
80c18d8
)
When calling DLIST_REMOVE(x,x) (from lib/interface.c) ensure that the pointer
author
Jeremy Allison
<jra@samba.org>
Tue, 20 Mar 2001 23:29:36 +0000
(23:29 +0000)
committer
Jeremy Allison
<jra@samba.org>
Tue, 20 Mar 2001 23:29:36 +0000
(23:29 +0000)
is still valid before setting prev and next to null.
Jeremy.
source/include/dlinklist.h
patch
|
blob
|
history
diff --git
a/source/include/dlinklist.h
b/source/include/dlinklist.h
index c35155d9bc7e3596cd04dc486c5e4e31035fe277..e68f2a4d861c72f8ac18707f200cad04bd3d6927 100644
(file)
--- a/
source/include/dlinklist.h
+++ b/
source/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 */