From c9de0520e4a6a96cb037eec1086f95b8f297c81f Mon Sep 17 00:00:00 2001 From: bustico Date: Thu, 16 Oct 2008 10:43:40 +0000 Subject: fix double free error in delAllRegexpsFromDictionary --- debian/changelog | 6 ++++++ src/Makefile | 1 + src/ivy.c | 6 ++++-- 3 files changed, 11 insertions(+), 2 deletions(-) diff --git a/debian/changelog b/debian/changelog index d85fc29..21eab24 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +ivy-c (3.11.5) unstable; urgency=low + + * fix double free error in delAllRegexpsFromDictionary + + -- Alexandre Bustico Mon, 16 Oct 2008 12:30:00 +0200 + ivy-c (3.11.4) unstable; urgency=low * fix again timer.c (thanks again to brno ivy dev team) so that timer could be removed within the callback diff --git a/src/Makefile b/src/Makefile index c329ca4..b128233 100644 --- a/src/Makefile +++ b/src/Makefile @@ -103,6 +103,7 @@ CFLAGS_RELEASE = -O2 -Wall -Wshadow $(FPIC) ifdef DEBUG export CFLAGS += $(CFLAGS_DEBUG) + LIB:= $(LIB)/debug else export CFLAGS += $(CFLAGS_RELEASE) endif diff --git a/src/ivy.c b/src/ivy.c index 2dd3a90..d2ba229 100644 --- a/src/ivy.c +++ b/src/ivy.c @@ -1481,8 +1481,6 @@ static void delAllRegexpsFromDictionary () for (msgSendDict=messSndByRegexp; msgSendDict ; msgSendDict=msgSendDict->hh.next) { /* on efface le binding */ IvyBindingFree (msgSendDict->binding); - /* on efface la clef (regexp source) */ - free (msgSendDict->regexp_src); /* pour chaque client abonne a cette regexp */ IVY_LIST_EACH ( msgSendDict->clientList, client) { freeClient (client); @@ -1491,6 +1489,10 @@ static void delAllRegexpsFromDictionary () IVY_LIST_EMPTY(msgSendDict->clientList); /* on enleve le couple regexp -> valeur */ HASH_DEL(messSndByRegexp, msgSendDict); + /* on efface la clef (regexp source) */ + free (msgSendDict->regexp_src); + /* on libčre la structure */ + // free (msgSendDict); } #ifdef OPENMP -- cgit v1.1