mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-04-23 04:55:15 +00:00
Kernel: Make CoreDump::create API OOM safe
This commit is contained in:
parent
32f96eb937
commit
d570048c9e
Notes:
sideshowbarker
2024-07-18 17:15:11 +09:00
Author: https://github.com/bgianfo Commit: https://github.com/SerenityOS/serenity/commit/d570048c9ee Pull-request: https://github.com/SerenityOS/serenity/pull/7520 Reviewed-by: https://github.com/supercomputer7
1 changed files with 1 additions and 1 deletions
|
@ -32,7 +32,7 @@ OwnPtr<CoreDump> CoreDump::create(NonnullRefPtr<Process> process, const String&
|
|||
auto fd = create_target_file(process, output_path);
|
||||
if (!fd)
|
||||
return {};
|
||||
return adopt_own(*new CoreDump(move(process), fd.release_nonnull()));
|
||||
return adopt_own_if_nonnull(new CoreDump(move(process), fd.release_nonnull()));
|
||||
}
|
||||
|
||||
CoreDump::CoreDump(NonnullRefPtr<Process> process, NonnullRefPtr<FileDescription>&& fd)
|
||||
|
|
Loading…
Add table
Reference in a new issue