wpp: Fixed resource leakages (Coverity).

This commit is contained in:
Marcus Meissner 2009-10-07 08:59:22 +02:00 committed by Alexandre Julliard
parent 41db6f8500
commit 15968fadef
1 changed files with 4 additions and 0 deletions

View File

@ -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;
}