mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 12:47:45 +00:00
Kernel: Handle OOM when allocating IPv4Socket optional scratch buffer
This commit is contained in:
parent
a6db2f985a
commit
c1a0e379e6
5 changed files with 18 additions and 12 deletions
|
@ -74,7 +74,7 @@ public:
|
|||
BufferMode buffer_mode() const { return m_buffer_mode; }
|
||||
|
||||
protected:
|
||||
IPv4Socket(int type, int protocol, NonnullOwnPtr<DoubleBuffer> receive_buffer);
|
||||
IPv4Socket(int type, int protocol, NonnullOwnPtr<DoubleBuffer> receive_buffer, OwnPtr<KBuffer> optional_scratch_buffer);
|
||||
virtual StringView class_name() const override { return "IPv4Socket"; }
|
||||
|
||||
PortAllocationResult allocate_local_port_if_needed();
|
||||
|
@ -130,7 +130,7 @@ private:
|
|||
|
||||
BufferMode m_buffer_mode { BufferMode::Packets };
|
||||
|
||||
Optional<KBuffer> m_scratch_buffer;
|
||||
OwnPtr<KBuffer> m_scratch_buffer;
|
||||
};
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue