xserver: Branch 'master'

Keith Packard keithp at kemper.freedesktop.org
Thu Jul 5 10:10:40 PDT 2012


 include/list.h |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 167993254a5cbe11a1f44fad1e8ae042089c1619
Author: Peter Hutterer <peter.hutterer at who-t.net>
Date:   Thu Jul 5 16:17:56 2012 +1000

    list.h: don't crash when removing an element from a NULL list
    
    Signed-off-by: Peter Hutterer <peter.hutterer at who-t.net>
    Signed-off-by: Keith Packard <keithp at keithp.com>

diff --git a/include/list.h b/include/list.h
index 96c0bcb..d54a207 100644
--- a/include/list.h
+++ b/include/list.h
@@ -453,7 +453,7 @@ xorg_list_is_empty(struct xorg_list *head)
 #define nt_list_del(_entry, _list, _type, _member)		\
 	do {							\
 		_type *__e = _entry;				\
-		if (__e == NULL) break;				\
+		if (__e == NULL || _list == NULL) break;        \
 		if ((_list) == __e) {				\
 		    _list = __e->_member;			\
 		} else {					\


More information about the xorg-commit mailing list