From 8aa5177b7c5a4ceb15cd43716b1c728146b9e1cb Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Tue, 20 Mar 2001 23:29:36 +0000 Subject: 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) --- source3/include/dlinklist.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source3') 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 */ -- cgit