From: j-h.choi Date: Tue, 8 May 2018 03:22:47 +0000 (+0900) Subject: [Coverity-112249] Fixed coverity issue. (NEGATIVE_RETURNS) X-Git-Tag: accepted/tizen/unified/20180508.071611^0 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=4fdf300081e1e2026ea8a438a82167a174237ab8;p=platform%2Fcore%2Fdotnet%2Flauncher.git [Coverity-112249] Fixed coverity issue. (NEGATIVE_RETURNS) Change-Id: I9810f00e9647010ee5a948ef4d07877fd8fbbdbb --- diff --git a/NativeLauncher/launcher/dotnet/dotnet_launcher.cc b/NativeLauncher/launcher/dotnet/dotnet_launcher.cc index db5c2c5..f3a1056 100644 --- a/NativeLauncher/launcher/dotnet/dotnet_launcher.cc +++ b/NativeLauncher/launcher/dotnet/dotnet_launcher.cc @@ -339,7 +339,8 @@ int CoreRuntime::launch(const char* appId, const char* root, const char* path, i int fd2 = open(root, O_DIRECTORY); dup3(fd2, fd, O_CLOEXEC); - close(fd2); + if (fd2 >= 0) + close(fd2); if (pluginBeforeExecute) pluginBeforeExecute();