uclient: fix segfault on connection failure

Signed-off-by: Luka Perkov <luka.perkov@sartura.hr>