mirror of
https://github.com/jemalloc/jemalloc.git
synced 2026-07-23 21:23:06 +00:00
rallocx path: only set errno on the realloc case.
This commit is contained in:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user