Commit db2fc801 authored by Michael Meskes's avatar Michael Meskes

Fix double frees in ecpg.

Patch by Patrick Krecker <patrick@judicata.com>
parent 1e22166e
......@@ -327,6 +327,7 @@ main(int argc, char *const argv[])
fprintf(stderr, _("%s: could not open file \"%s\": %s\n"),
progname, output_filename, strerror(errno));
free(output_filename);
output_filename = NULL;
free(input_filename);
continue;
}
......@@ -474,8 +475,10 @@ main(int argc, char *const argv[])
}
}
if (output_filename && out_option == 0)
if (output_filename && out_option == 0) {
free(output_filename);
output_filename = NULL;
}
free(input_filename);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment