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

Unified Diff: runtime/bin/secure_socket.cc

Issue 1800863002: Cleanup in //runtime/bin (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: 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/secure_socket.h ('k') | runtime/bin/secure_socket_unsupported.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/bin/secure_socket.cc
diff --git a/runtime/bin/secure_socket.cc b/runtime/bin/secure_socket.cc
index a2691347b1fe13ed795326da9aac3b81aeb773ee..f419c04ad8e738796161a6df88fa7cd3b6e04a40 100644
--- a/runtime/bin/secure_socket.cc
+++ b/runtime/bin/secure_socket.cc
@@ -6,9 +6,9 @@
#include <errno.h>
#include <fcntl.h>
-#include <sys/stat.h>
#include <stdio.h>
#include <string.h>
+#include <sys/stat.h>
#include <openssl/bio.h>
#include <openssl/err.h>
@@ -83,8 +83,7 @@ static void FetchErrorString(char* buffer, int length) {
/* Handle an error reported from the BoringSSL library. */
static void ThrowIOException(int status,
const char* exception_type,
- const char* message,
- bool free_message = false) {
+ const char* message) {
char error_string[SSL_ERROR_MESSAGE_BUFFER_SIZE];
FetchErrorString(error_string, SSL_ERROR_MESSAGE_BUFFER_SIZE);
OSError os_error_struct(status, error_string, OSError::kBoringSSL);
@@ -92,9 +91,6 @@ static void ThrowIOException(int status,
Dart_Handle exception =
DartUtils::NewDartIOException(exception_type, message, os_error);
ASSERT(!Dart_IsError(exception));
- if (free_message) {
- free(const_cast<char*>(message));
- }
Dart_ThrowException(exception);
UNREACHABLE();
}
@@ -677,7 +673,7 @@ static int SetTrustedCertificatesBytesPKCS12(SSL_CTX* context,
const char* password) {
ScopedPKCS12 p12(d2i_PKCS12_bio(bio, NULL));
if (p12.get() == NULL) {
- return NULL;
+ return 0;
}
EVP_PKEY* key = NULL;
@@ -787,7 +783,7 @@ static int UseChainBytesPKCS12(SSL_CTX* context,
const char* password) {
ScopedPKCS12 p12(d2i_PKCS12_bio(bio, NULL));
if (p12.get() == NULL) {
- return NULL;
+ return 0;
}
EVP_PKEY* key = NULL;
« no previous file with comments | « runtime/bin/secure_socket.h ('k') | runtime/bin/secure_socket_unsupported.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698