Fixing memory leak

Think I've caught a small memory leak here, unless I've read the code path wrong ...