From b33515e9409fa034080d5e5560929649f7605944 Mon Sep 17 00:00:00 2001 From: Ricardo Markiewicz Date: Tue, 30 Mar 2004 05:42:44 +0000 Subject: [PATCH] * BUGFIX : Libero correctamente la memoria de los widgets --- gui/form.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/gui/form.c b/gui/form.c index cad8091..44ad1e8 100644 --- a/gui/form.c +++ b/gui/form.c @@ -162,8 +162,17 @@ t_Widget *widget_radio_create(t_Campo tipo, const char *nombre, unsigned int max void widget_free(t_Widget *w) { + int i; free(w->nombre); - free(w->valor); + switch (w->tipo) { + case INPUT: + free(w->valor); + break; + case RADIO: + for(i=0; imax; i++) + free(w->opciones[i]); + free(w->opciones); + } free(w); } -- 2.43.0