From: Jongmin Lee Date: Mon, 7 Oct 2019 08:36:29 +0000 (+0900) Subject: Resolve the possible use of negative value (detected by coverity tool) X-Git-Tag: accepted/tizen/5.5/unified/20191031.010026^0 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=refs%2Fheads%2Faccepted%2Ftizen_5.5_unified_mobile_hotfix;p=platform%2Fupstream%2Fat-spi2-core.git Resolve the possible use of negative value (detected by coverity tool) Change-Id: Ibb68f024ef14a0beb10d2bc63ff28fe03d55762f --- diff --git a/bus/at-spi-bus-launcher.c b/bus/at-spi-bus-launcher.c index b15345b..91bdd48 100644 --- a/bus/at-spi-bus-launcher.c +++ b/bus/at-spi-bus-launcher.c @@ -400,8 +400,8 @@ ensure_a11y_bus_daemon (A11yBusLauncher *app, char *config_path) return TRUE; error: - close (app->pipefd[0]); - close (app->pipefd[1]); + if (app->pipefd[0] > 0) close (app->pipefd[0]); + if (app->pipefd[1] > 0) close (app->pipefd[1]); app->state = A11Y_BUS_STATE_ERROR; return FALSE;