Module: wine Branch: master Commit: 15968fadef203d45620709d341fc397841210b7e URL: http://source.winehq.org/git/wine.git/?a=commit;h=15968fadef203d45620709d341...
Author: Marcus Meissner marcus@jet.franken.de Date: Wed Oct 7 08:59:22 2009 +0200
wpp: Fixed resource leakages (Coverity).
---
libs/wpp/wpp.c | 4 ++++ 1 files changed, 4 insertions(+), 0 deletions(-)
diff --git a/libs/wpp/wpp.c b/libs/wpp/wpp.c index e6a1a83..afca1bb 100644 --- a/libs/wpp/wpp.c +++ b/libs/wpp/wpp.c @@ -216,12 +216,16 @@ int wpp_parse_temp( const char *input, const char *output_base, char **output_na if((fd = mkstemps( temp_name, 0 )) == -1) { ppy_error("Could not generate a temp name from %s\n", temp_name); + free( temp_name ); return 2; }
if (!(output = fdopen(fd, "wt"))) { ppy_error("Could not open fd %s for writing\n", temp_name); + close( fd ); + unlink( temp_name ); + free( temp_name ); return 2; }