From: Ricardo Markiewicz Date: Tue, 30 Mar 2004 05:42:44 +0000 (+0000) Subject: * BUGFIX : Libero correctamente la memoria de los widgets X-Git-Tag: svn_import_r684~674 X-Git-Url: https://git.llucax.com/z.facultad/75.06/emufs.git/commitdiff_plain/b33515e9409fa034080d5e5560929649f7605944?ds=sidebyside * BUGFIX : Libero correctamente la memoria de los widgets --- 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); }