Fix control flow error (and a memory leak) found by coverity CID 26646