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

Unified Diff: runtime/bin/crypto_android.cc

Issue 1781883002: Fixes some memory leaks in //runtime/bin (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Fix tests on Windows Created 4 years, 9 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 | « runtime/bin/crypto.cc ('k') | runtime/bin/crypto_linux.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/bin/crypto_android.cc
diff --git a/runtime/bin/crypto_android.cc b/runtime/bin/crypto_android.cc
index 4b55b910146141e8ad1a9277c76909f9d7eada9e..be91d4ee9258a45c6b92eba40bd088d80d9d31e5 100644
--- a/runtime/bin/crypto_android.cc
+++ b/runtime/bin/crypto_android.cc
@@ -10,10 +10,8 @@
#include "bin/fdutils.h"
#include "bin/crypto.h"
-
#include "platform/signal_blocker.h"
-
namespace dart {
namespace bin {
@@ -21,7 +19,9 @@ bool Crypto::GetRandomBytes(intptr_t count, uint8_t* buffer) {
ThreadSignalBlocker signal_blocker(SIGPROF);
intptr_t fd = TEMP_FAILURE_RETRY_NO_SIGNAL_BLOCKER(
open("/dev/urandom", O_RDONLY));
- if (fd < 0) return false;
+ if (fd < 0) {
+ return false;
+ }
intptr_t bytes_read = 0;
do {
int res = TEMP_FAILURE_RETRY_NO_SIGNAL_BLOCKER(
« no previous file with comments | « runtime/bin/crypto.cc ('k') | runtime/bin/crypto_linux.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698