Fix a leak and a slightly spurious analyzer warning.