X-Git-Url: https://git.llucax.com/z.facultad/75.06/emufs.git/blobdiff_plain/4905645b9485987df5d6a5a898c5c6d50ebeab31..5720b3f8df66478279f271065447e93848437fb7:/emufs_gui/articulos.c diff --git a/emufs_gui/articulos.c b/emufs_gui/articulos.c index 91bb4a7..b9605c2 100644 --- a/emufs_gui/articulos.c +++ b/emufs_gui/articulos.c @@ -83,6 +83,8 @@ t_LstArticulos *art_cargar(const char *filename, int tipo, int tam_bloque) if (filename != NULL) { document = xmlReadFile(filename, "ISO-8859-1",0); if (document == NULL) { + free(tmp); + lst_articulos = NULL; return NULL; } @@ -151,9 +153,14 @@ int art_liberar(t_LstArticulos *l) { if (l == NULL) l = lst_articulos; if (l == NULL) return 1; + t_Reg_Articulo *del; emufs_destruir(l->fp); - /* TODO : Liberar lista */ + while (l->primero) { + del = l->primero; + l->primero = l->primero->sig; + free(del); + } free(l); lst_articulos = NULL;