A bunch more scopers. Change-Id: I5c8dbfec4a404d8d1501725a90b383eb3e05c664 Reviewed-on: https://boringssl-review.googlesource.com/29591 Reviewed-by: Adam Langley <agl@google.com>
diff --git a/ssl/ssl_cipher.cc b/ssl/ssl_cipher.cc index 42be591..02380c1 100644 --- a/ssl/ssl_cipher.cc +++ b/ssl/ssl_cipher.cc
@@ -1137,7 +1137,7 @@ return true; } -bool ssl_create_cipher_list(SSLCipherPreferenceList **out_cipher_list, +bool ssl_create_cipher_list(UniquePtr<SSLCipherPreferenceList> *out_cipher_list, const char *rule_str, bool strict) { // Return with error if nothing to do. if (rule_str == NULL || out_cipher_list == NULL) { @@ -1255,10 +1255,7 @@ return false; } - if (*out_cipher_list) { - Delete(*out_cipher_list); - } - *out_cipher_list = pref_list.release(); + *out_cipher_list = std::move(pref_list); // Configuring an empty cipher list is an error but still updates the // output.