Fix CID 1491373 and 1491378: resource leaks.