Skip to content

Commit

Permalink
Fix file handle leak.
Browse files Browse the repository at this point in the history
When the maximum read depth is reached, push_read_file() fails and
run_command_file() returns without closing the file.
  • Loading branch information
Quipyowert2 authored and ThomasAdam committed Feb 3, 2021
1 parent 1164090 commit 4ca3277
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions fvwm/read.c
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -248,6 +248,7 @@ int run_command_file(
if (push_read_file(full_filename) == 0)
{
free(full_filename);
fclose(f);
return 0;
}
run_command_stream(NULL, f, exc);
Expand Down

0 comments on commit 4ca3277

Please sign in to comment.