Submitted By: David B. Cortarello (Nomius) Date: 15-03-2007 Initial Package Version: 3git Description: The patch was created from the original wistumbler 3 git This patch provides the following bug solution: * Fixed List_free as FREEing l and l->data wasn't right * Added -lm and libiw.a to Makefile as Linux needs it. (dirty, but works) diff --git a/curses/Makefile.acr b/curses/Makefile.acr index d1ab01f..51fed74 100644 --- a/curses/Makefile.acr +++ b/curses/Makefile.acr @@ -8,9 +8,10 @@ LDFLAGS+=-lcurses ##LINUX## LDFLAGS+=-liw -L/usr/pkg/lib ##LINUX## +LIBS=/usr/lib/libiw.a -lm all: ${OBJ} - ${CC} ${LDFLAGS} ${OBJ} -o ${BIN} + ${CC} ${LDFLAGS} ${OBJ} ${LIBS} -o ${BIN} clean: -rm -f ${OBJ} ${BIN} diff --git a/libwist/Makefile.acr b/libwist/Makefile.acr index a3ba73d..f72fde3 100644 --- a/libwist/Makefile.acr +++ b/libwist/Makefile.acr @@ -5,7 +5,7 @@ LDFLAGS=@LDFLAGS@ LDFLAGS+=-L/usr/pkg/lib ##LINUX## -LIBS=-liw +LIBS=-liw /usr/lib/libiw.a -lm ##LINUX## OBJ=iface.o list.o dhcp.o main.o wireless.o diff --git a/libwist/list.c b/libwist/list.c index 7e02019..e12a6fb 100644 --- a/libwist/list.c +++ b/libwist/list.c @@ -32,8 +32,8 @@ void List_free(List *l) for(last = l; last->next; last = last->next) { next = last->next; - FREE(l->data); - FREE(l); + FREE(next->data); + FREE(next); } }