Skip to content
Snippets Groups Projects
Commit 31c32930 authored by Avi Kivity's avatar Avi Kivity
Browse files

file: fix falloc_noinstall() error case


'new file' doesn't return nullptr, it throws (well except in osv where new
always succeeds).

Replace with new (nothrow) to get the expected behaviour.

Signed-off-by: default avatarAvi Kivity <avi@cloudius-systems.com>
parent c1f855d6
No related branches found
No related tags found
No related merge requests found
......@@ -159,7 +159,7 @@ static int falloc_noinstall(struct file **resultfp)
{
struct file *fp;
fp = new file;
fp = new (std::nothrow) file;
if (!fp)
return ENOMEM;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment