Fix return value of BIO_free
authorPeiwei Hu <58985155+PeiweiHu@users.noreply.github.com>
Sun, 26 Sep 2021 07:28:19 +0000 (15:28 +0800)
committerPauli <pauli@openssl.org>
Tue, 28 Sep 2021 09:25:30 +0000 (19:25 +1000)
CLA: trivial

Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Paul Dale <pauli@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/16682)

crypto/bio/bio_lib.c

index a378f186d7b4a07612755b376207c536fcbc490c..25df70f76088abb89e7ec2df9e38b1d0c3acf44d 100644 (file)
@@ -140,7 +140,7 @@ int BIO_free(BIO *a)
     if (HAS_CALLBACK(a)) {
         ret = (int)bio_call_callback(a, BIO_CB_FREE, NULL, 0, 0, 0L, 1L, NULL);
         if (ret <= 0)
-            return ret;
+            return 0;
     }
 
     if ((a->method != NULL) && (a->method->destroy != NULL))