Fix resource leak CID 18117