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

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: Windows fixes 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
Index: runtime/bin/secure_socket.cc
diff --git a/runtime/bin/secure_socket.cc b/runtime/bin/secure_socket.cc
index a2691347b1fe13ed795326da9aac3b81aeb773ee..25a93da26c22e58810e7fd9e22c31482432b50ae 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();
}

Powered by Google App Engine
This is Rietveld 408576698