host/common: Fixed leak in error path

Addresses CID 1042550