Skip to content

Commit

Permalink
successive failures of "set print <foo>" could cause double-free
Browse files Browse the repository at this point in the history
Bug #2312
  • Loading branch information
Ethan A Merritt committed Sep 9, 2020
1 parent 160d751 commit 052cbd1
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/command.c
Expand Up @@ -1914,6 +1914,7 @@ print_set_output(char *name, TBOOLEAN datablock, TBOOLEAN append_p)
#endif
if (0 > fclose(print_out))
perror(print_out_name);
print_out = stderr;
}

free(print_out_name);
Expand Down

0 comments on commit 052cbd1

Please sign in to comment.