mirror of
https://github.com/RGBCube/serenity
synced 2025-07-24 14:37:43 +00: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);
|
auto fd = create_target_file(process, output_path);
|
||||||
if (!fd)
|
if (!fd)
|
||||||
return {};
|
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)
|
CoreDump::CoreDump(NonnullRefPtr<Process> process, NonnullRefPtr<FileDescription>&& fd)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue