mirror of
https://github.com/jemalloc/jemalloc.git
synced 2026-04-14 14:41:42 +03:00
rallocx path: only set errno on the realloc case.
This commit is contained in:
parent
5081c16bb4
commit
83b075789b
1 changed files with 3 additions and 1 deletions
|
|
@ -3498,7 +3498,9 @@ do_rallocx(void *ptr, size_t size, int flags, bool is_realloc) {
|
|||
|
||||
return p;
|
||||
label_oom:
|
||||
set_errno(ENOMEM);
|
||||
if (is_realloc) {
|
||||
set_errno(ENOMEM);
|
||||
}
|
||||
if (config_xmalloc && unlikely(opt_xmalloc)) {
|
||||
malloc_write("<jemalloc>: Error in rallocx(): out of memory\n");
|
||||
abort();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue