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)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy