Skip to content

Commit

Permalink
Help: Fix memory leak given ambiguous man page title on command line
Browse files Browse the repository at this point in the history
Given a command line with an ambiguous man page title, such as `$ Help
uname`, Help would find and try to open all matching pages, leading to
bad behavior such as a memory leak, flickering scrollbars, and
eventually a crash due to OOM. This commit fixes the issue by making
Help only open one page on startup.
  • Loading branch information
Rummskartoffel authored and awesomekling committed Dec 27, 2021
1 parent b367223 commit ab2c5ee
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions Userland/Applications/Help/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -331,6 +331,7 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
history.push(path);
open_page(path);
set_start_page = true;
break;
}
}

Expand Down

0 comments on commit ab2c5ee

Please sign in to comment.