From 1e129b9677a4073030b6533743c3a84056275548 Mon Sep 17 00:00:00 2001 From: alegrand Date: Tue, 16 Nov 2004 22:54:07 +0000 Subject: [PATCH 1/1] Gasp ! A bug in the extract function ! Shame on me ! git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/simgrid/simgrid/trunk@519 48e7efb5-ca39-0410-a469-dd3cf9ba447f --- src/xbt/swag.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/xbt/swag.c b/src/xbt/swag.c index 42ae4ef19b..dc09977550 100644 --- a/src/xbt/swag.c +++ b/src/xbt/swag.c @@ -59,6 +59,10 @@ void *xbt_swag_extract(void *obj, xbt_swag_t swag) if (!obj) return NULL; + if(!xbt_swag_belongs(obj, swag)) /* Trying to remove an object that + was not in this swag */ + return NULL; + if (swag->head == swag->tail) { /* special case */ if (swag->head != obj) /* Trying to remove an object that was not in this swag */ return NULL; -- 2.20.1