BUG: fix minor memory leak in memoryview failure case