HomePhabricator

knownhosts: Fix possible memory leak

Authored by Anderson Toshiyuki Sasaki <ansasaki@redhat.com> on Jul 2 2019, 10:21 AM.

Description

knownhosts: Fix possible memory leak

The memory allocated for host_port can leak if the global knownhosts
file is unaccessible.

Found by address sanitizer build in CI.

Signed-off-by: Anderson Toshiyuki Sasaki <ansasaki@redhat.com>
Reviewed-by: Jakub Jelen <jjelen@redhat.com>