mirror of
https://github.com/SerenityOS/serenity.git
synced 2025-01-23 09:51:57 -05:00
Kernel: Make CoreDump::create API OOM safe
This commit is contained in:
parent
32f96eb937
commit
d570048c9e
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