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

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: 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') | base/shared_memory_posix.cc » ('J')
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..aaf75aca9c2331ab32f53206bb15136b664f9189 100644
--- a/base/platform_file_posix.cc
+++ b/base/platform_file_posix.cc
@@ -55,7 +55,9 @@ 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 = *error_code ? PLATFORM_FILE_ERROR_FAILED :
rvargas (doing something else) 2011/06/23 03:43:53 I have no idea why this code was changed from what
Greg Billock 2011/06/23 16:58:32 Yeah, I think the previous version was right. I'll
+ PLATFORM_FILE_OK;
return kInvalidPlatformFileValue;
}
« no previous file with comments | « no previous file | base/shared_memory_posix.cc » ('j') | base/shared_memory_posix.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698