connect01: fix fd leak

And also one old-style warning.

Signed-off-by: Jan Stancek <jstancek@redhat.com>