connect.c: Fixed compilation warning

warning: 'res' may be used uninitialized in this function