* preproc/nasm: Close the input file; addressed a few memory leaks.
* yasm.c: delete include paths before we exit
* cv-dbgfmt.c: Free cv_filename::filename too.
yasm_linemap_destroy(linemap);
yasm_errwarns_destroy(errwarns);
cleanup(object);
+ yasm_delete_include_paths();
return EXIT_SUCCESS;
}
for (i=0; i<dbgfmt_cv->filenames_size; i++) {
if (dbgfmt_cv->filenames[i].pathname)
yasm_xfree(dbgfmt_cv->filenames[i].pathname);
+ if (dbgfmt_cv->filenames[i].filename)
+ yasm_xfree(dbgfmt_cv->filenames[i].filename);
}
yasm_xfree(dbgfmt_cv->filenames);
yasm_xfree(dbgfmt);
Token *line = tokenise(*p);
line = expand_smacro(line);
*p = detoken(line, FALSE);
+ do
+ line = delete_Token(line);
+ while (line);
}
/**
inc->next = istk;
inc->conds = NULL;
inc->fp = inc_fopen(p, &newname);
+ nasm_free(p);
inc->fname = nasm_src_set_fname(newname);
inc->lineno = nasm_src_set_linnum(0);
inc->lineinc = 1;
}
istk = i->next;
list->downlevel(LIST_INCLUDE);
+ nasm_free(i->fname);
nasm_free(i);
if (!istk)
return NULL;
yasm_xfree(preproc_nasm->line);
if (preproc_nasm->file_name)
yasm_xfree(preproc_nasm->file_name);
+ if (preproc_nasm->in)
+ fclose(preproc_nasm->in);
yasm_xfree(preproc);
if (preproc_deps)
yasm_xfree(preproc_deps);
+ yasm_xfree(nasm_src_set_fname(NULL));
}
static char *