Fix memory-leak spotted by Coverity