Fix memory leak on bit_array test