Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(100)

Unified Diff: base/platform_file_posix.cc

Issue 7222010: Coverity fixes CID=15870,13529 Check pointer before assign, resource leak. (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: Revert to pre-79058 state Created 9 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | base/shared_memory_posix.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/platform_file_posix.cc
diff --git a/base/platform_file_posix.cc b/base/platform_file_posix.cc
index 26c52d4682fe3e9451f4f4a24b08ce45f226752d..02c2f2f54854098bf0efdacb02374e419310f2f7 100644
--- a/base/platform_file_posix.cc
+++ b/base/platform_file_posix.cc
@@ -55,7 +55,8 @@ PlatformFile CreatePlatformFile(const FilePath& name, int flags,
!(flags & PLATFORM_FILE_OPEN_ALWAYS)) {
NOTREACHED();
errno = EOPNOTSUPP;
- *error_code = error_code ? PLATFORM_FILE_ERROR_FAILED : PLATFORM_FILE_OK;
+ if (error_code)
+ *error_code = PLATFORM_FILE_ERROR_FAILED;
return kInvalidPlatformFileValue;
}
« no previous file with comments | « no previous file | base/shared_memory_posix.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698