Skip to content

Commit

Permalink
fix: add pointer check
Browse files Browse the repository at this point in the history
  • Loading branch information
OEOTYAN committed Feb 10, 2024
1 parent f1cfaa2 commit f4051dc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/ll/core/tweak/ModifyMemoryAllocator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ class MimallocMemoryAllocatorWithCheck : public MimallocMemoryAllocator {
if (mi_is_in_heap_region(ptr)) {
return mi_usable_size(ptr);
} else {
return _msize(ptr);
return ptr ? _msize(ptr) : 0ui64;
}
}

Expand Down

0 comments on commit f4051dc

Please sign in to comment.