Skip to content

Commit

Permalink
SDL: plug potential leak of directory handle
Browse files Browse the repository at this point in the history
  • Loading branch information
backwardsEric authored and NickMcConnell committed Mar 27, 2024
1 parent a20fa13 commit 90ebf55
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/main-sdl.c
Original file line number Diff line number Diff line change
Expand Up @@ -2182,6 +2182,7 @@ static void RefreshFontBrowser(sdl_Button *sender)
ang_dir *dir2 = my_dopen(full_path);

if (dir2) {
my_dclose(dir2);
if (FontBrowserDirCount
== FontBrowserDirAlloc) {
if (FontBrowserDirAlloc
Expand All @@ -2203,7 +2204,6 @@ static void RefreshFontBrowser(sdl_Button *sender)
FontBrowserDirEntries[FontBrowserDirCount] =
string_make(file_part);
++FontBrowserDirCount;
my_dclose(dir2);
}
}
} else if (is_font_file(full_path)) {
Expand Down

0 comments on commit 90ebf55

Please sign in to comment.