X-Git-Url: https://git.llucax.com/z.facultad/75.06/emufs.git/blobdiff_plain/1768f8e93e4bf3531b27b923036fa4fa98d29ccf..b33515e9409fa034080d5e5560929649f7605944:/gui/form.c 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); }