Tests: ControllableAllocator controls reallocate() too

This commit is contained in:
Benoit Blanchon
2023-04-08 09:18:15 +02:00
parent b3132cac3a
commit 6eb4f45fb9

View File

@ -171,7 +171,7 @@ class ControllableAllocator : public ArduinoJson::Allocator {
}
void* reallocate(void* ptr, size_t n) override {
return _upstream->reallocate(ptr, n);
return _enabled ? _upstream->reallocate(ptr, n) : 0;
}
void disable() {