Content-Length: 275905 | pFad | http://github.com/postgrespro/postgres_cluster/commit/db2fc801f66a70969cbdd5673ed9d02025c70695

2F Fix double frees in ecpg. · postgrespro/postgres_cluster@db2fc80 · GitHub
Skip to content

Commit db2fc80

Browse files
author
Michael Meskes
committed
Fix double frees in ecpg.
Patch by Patrick Krecker <patrick@judicata.com>
1 parent 1e22166 commit db2fc80

File tree

1 file changed

+4
-1
lines changed
  • src/interfaces/ecpg/preproc

1 file changed

+4
-1
lines changed

src/interfaces/ecpg/preproc/ecpg.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -327,6 +327,7 @@ main(int argc, char *const argv[])
327327
fprintf(stderr, _("%s: could not open file \"%s\": %s\n"),
328328
progname, output_filename, strerror(errno));
329329
free(output_filename);
330+
output_filename = NULL;
330331
free(input_filename);
331332
continue;
332333
}
@@ -474,8 +475,10 @@ main(int argc, char *const argv[])
474475
}
475476
}
476477

477-
if (output_filename && out_option == 0)
478+
if (output_filename && out_option == 0) {
478479
free(output_filename);
480+
output_filename = NULL;
481+
}
479482

480483
free(input_filename);
481484
}

0 commit comments

Comments
 (0)








ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: http://github.com/postgrespro/postgres_cluster/commit/db2fc801f66a70969cbdd5673ed9d02025c70695

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy