Skip to content

Commit

Permalink
Make sure not to leak tmp_errfile if only outf creation fails
Browse files Browse the repository at this point in the history
  • Loading branch information
techee committed May 6, 2016
1 parent 084c23b commit 7fe549d
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion tagmanager/src/tm_workspace.c
Expand Up @@ -553,12 +553,14 @@ static gchar *pre_process_file(const gchar *cmd, const gchar *inf)
{
gint ret;
gchar *outf = create_temp_file("tmp_XXXXXX.cpp");
gchar *tmp_errfile = create_temp_file("tmp_XXXXXX");
gchar *tmp_errfile;
gchar *errors = NULL;
gchar *command;

if (!outf)
return NULL;

tmp_errfile = create_temp_file("tmp_XXXXXX");
if (!tmp_errfile)
{
g_unlink(outf);
Expand Down

0 comments on commit 7fe549d

Please sign in to comment.