diff options
author | Johan Hedberg <johan.hedberg@nokia.com> | 2007-08-30 13:45:58 +0000 |
---|---|---|
committer | Johan Hedberg <johan.hedberg@nokia.com> | 2007-08-30 13:45:58 +0000 |
commit | 56e8f3fc3c15ceb035cda16d9dada129674cfeff (patch) | |
tree | d3835c5b618515821f6523589598c7d502f8da12 /input | |
parent | fbcf118559e6e8c2b593d39931810942d61dcd00 (diff) |
Fix socket validity checks
Diffstat (limited to 'input')
-rw-r--r-- | input/manager.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/input/manager.c b/input/manager.c index 47638278..5dfb0641 100644 --- a/input/manager.c +++ b/input/manager.c @@ -348,7 +348,7 @@ failed: err_connection_failed(pr->conn, pr->msg, strerror(err)); cleanup: - if (isk > 0) + if (isk >= 0) close(isk); close(pr->ctrl_sock); @@ -406,7 +406,7 @@ static gboolean control_connect_cb(GIOChannel *chan, return FALSE; failed: - if (csk > 0) + if (csk >= 0) close(csk); err_connection_failed(pr->conn, pr->msg, strerror(err)); |