firmware-utils/mktitanimg: fix possible resource leak