Skip to content

Commit

Permalink
Set errno on realloc failure.
Browse files Browse the repository at this point in the history
This was not being done for certain cases as per microsoft#461.
Note that malloc and calloc are probably still not setting errno for
those cases but this is not currently tested...
  • Loading branch information
ronorton committed Feb 21, 2022
1 parent 2a4a4fc commit 3630880
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/override/malloc.cc
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,10 @@ extern "C"
{
a.dealloc(ptr);
}
else
{
errno = ENOMEM;
}
return p;
}

Expand Down

0 comments on commit 3630880

Please sign in to comment.