diff --git a/buddy/ChangeLog b/buddy/ChangeLog index f9a988f78..0f8a11a64 100644 --- a/buddy/ChangeLog +++ b/buddy/ChangeLog @@ -1,3 +1,9 @@ +2004-01-07 Alexandre Duret-Lutz + + * src/bddop.c (bdd_support): Free supportSet if it needs to be + reallocated. This fixes a memory leak reported by + Souheib.Baarir@lip6.fr. + 2003-11-14 Alexandre Duret-Lutz * examples/Makefile.def (AM_CPPFLAGS): Add -I$(srcdir). diff --git a/buddy/src/bddop.c b/buddy/src/bddop.c index 8b417413d..d2a9960e8 100644 --- a/buddy/src/bddop.c +++ b/buddy/src/bddop.c @@ -1,5 +1,5 @@ /*======================================================================== - Copyright (C) 1996-2003 by Jorn Lind-Nielsen + Copyright (C) 1996-2004 by Jorn Lind-Nielsen All rights reserved Permission is hereby granted, without written agreement and without @@ -28,7 +28,7 @@ ========================================================================*/ /************************************************************************* - $Header: /Volumes/CVS/repository/spot/spot/buddy/src/bddop.c,v 1.8 2003/08/06 14:14:16 aduret Exp $ + $Header: /Volumes/CVS/repository/spot/spot/buddy/src/bddop.c,v 1.9 2004/01/07 16:05:21 adl Exp $ FILE: bddop.c DESCR: BDD operators AUTH: Jorn Lind @@ -2042,6 +2042,8 @@ BDD bdd_support(BDD r) /* On-demand allocation of support set */ if (supportSize < bddvarnum) { + if (supportSet) + free(supportSet); if ((supportSet=(int*)malloc(bddvarnum*sizeof(int))) == NULL) { bdd_error(BDD_MEMORY);