]> git.ipfire.org Git - thirdparty/openssl.git/blobdiff - crypto/dh/dh_ameth.c
Remove goto inside an if(0) block
[thirdparty/openssl.git] / crypto / dh / dh_ameth.c
index c9374b77f98887360adf0c5947f05de06282d1a0..b45173e2a8f85aaa9f1b9d072a91e9bff81d2c3d 100644 (file)
@@ -327,7 +327,7 @@ static int do_dh_print(BIO *bp, const DH *x, int indent,
                        ASN1_PCTX *ctx, int ptype)
 {
     unsigned char *m = NULL;
-    int reason = ERR_R_BUF_LIB, ret = 0;
+    int reason = ERR_R_BUF_LIB;
     size_t buf_len = 0;
 
     const char *ktype = NULL;
@@ -415,13 +415,13 @@ static int do_dh_print(BIO *bp, const DH *x, int indent,
             goto err;
     }
 
-    ret = 1;
-    if (0) {
+    OPENSSL_free(m);
+    return 1;
+
  err:
-        DHerr(DH_F_DO_DH_PRINT, reason);
-    }
+    DHerr(DH_F_DO_DH_PRINT, reason);
     OPENSSL_free(m);
-    return (ret);
+    return 0;
 }
 
 static int int_dh_size(const EVP_PKEY *pkey)