BUG: fix minor memory leak in memoryview failure case
Merge pull request #4197 from juliantaylor/memview-leak

BUG: fix minor memory leak in memoryview failure case