mirror of
https://github.com/jemalloc/jemalloc.git
synced 2026-07-24 13:53:11 +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;
|
return p;
|
||||||
label_oom:
|
label_oom:
|
||||||
set_errno(ENOMEM);
|
if (is_realloc) {
|
||||||
|
set_errno(ENOMEM);
|
||||||
|
}
|
||||||
if (config_xmalloc && unlikely(opt_xmalloc)) {
|
if (config_xmalloc && unlikely(opt_xmalloc)) {
|
||||||
malloc_write("<jemalloc>: Error in rallocx(): out of memory\n");
|
malloc_write("<jemalloc>: Error in rallocx(): out of memory\n");
|
||||||
abort();
|
abort();
|
||||||
|
|||||||
Reference in New Issue
Block a user