Give ENGINE_free a return value. This simplifies building against cryptography.io, which expects ENGINE_free to return something. Change-Id: Id1590abab7f47dae6b3a9d593fa7b0fe371c9912 Reviewed-on: https://boringssl-review.googlesource.com/c/boringssl/+/35644 Reviewed-by: Adam Langley <agl@google.com>
diff --git a/crypto/engine/engine.c b/crypto/engine/engine.c index 875f148..973a57c 100644 --- a/crypto/engine/engine.c +++ b/crypto/engine/engine.c
@@ -41,9 +41,10 @@ return engine; } -void ENGINE_free(ENGINE *engine) { +int ENGINE_free(ENGINE *engine) { // Methods are currently required to be static so are not unref'ed. OPENSSL_free(engine); + return 1; } // set_method takes a pointer to a method and its given size and sets
diff --git a/include/openssl/engine.h b/include/openssl/engine.h index 9d45952..ce60de4 100644 --- a/include/openssl/engine.h +++ b/include/openssl/engine.h
@@ -40,8 +40,8 @@ OPENSSL_EXPORT ENGINE *ENGINE_new(void); // ENGINE_free decrements the reference counts for all methods linked from -// |engine| and frees |engine| itself. -OPENSSL_EXPORT void ENGINE_free(ENGINE *engine); +// |engine| and frees |engine| itself. It returns one. +OPENSSL_EXPORT int ENGINE_free(ENGINE *engine); // Method accessors.