diff --git a/reactos/tools/regtests2xml/regtests2xml.c b/reactos/tools/regtests2xml/regtests2xml.c index 5759b50ea1d..3a079b302d4 100644 --- a/reactos/tools/regtests2xml/regtests2xml.c +++ b/reactos/tools/regtests2xml/regtests2xml.c @@ -81,7 +81,6 @@ convert_path(char* origpath) static void write_line(char *line) { - int n_out; char buf[200]; memset(buf, 0, sizeof(buf)); @@ -90,7 +89,7 @@ write_line(char *line) buf[strlen(buf)] = '\r'; buf[strlen(buf)] = '\n'; - n_out = fwrite(&buf[0], 1, strlen(buf), out); + (void)fwrite(&buf[0], 1, strlen(buf), out); } @@ -414,6 +413,7 @@ int main(int argc, char **argv) input_file = convert_path(argv[1]); if (input_file[0] == 0) { + free(input_file); printf("Missing input-filename\n"); return 1; } @@ -421,6 +421,8 @@ int main(int argc, char **argv) output_file = convert_path(argv[2]); if (output_file[0] == 0) { + free(output_file); + free(input_file); printf("Missing output-filename\n"); return 1; } @@ -428,6 +430,8 @@ int main(int argc, char **argv) out = fopen(output_file, "wb"); if (out == NULL) { + free(input_file); + free(output_file); printf("Cannot open output file"); return 1; } @@ -436,6 +440,8 @@ int main(int argc, char **argv) generate_xml(); + free(input_file); + free(output_file); fclose(out); return 0;