Fix issue where moving BitVector could cause free(nullptr)
If one std::move's a BitVector the old BitVector's storage_ will be
nulled and size set to 0. This is fine but when ~BitVector is run the
allocator will be asked to free a nullptr. Since this is generally not
expected by allocators, not supported by some and breaks the movement
semantics of C++ I've changed the behavior to only Free memory
if there is memory to be freed.
Test: ./test.py --host
Change-Id: I2716a604370c94bcea1a0989c5e6b94e45a2b063
2 files changed