summaryrefslogtreecommitdiff
path: root/main
diff options
context:
space:
mode:
authorArne Schwabe <arne@rfc2549.org>2021-10-30 23:00:19 +0200
committerArne Schwabe <arne@rfc2549.org>2021-12-17 11:36:32 +0100
commit1e40ded48b1dfbb9edcd13a4f6d4f69abfb7ffb2 (patch)
tree33c8ff45baae1e44ae6ed103b330dea7dd0ea1f9 /main
parent3348484912550a4d72a082ad21f9871bc2159afb (diff)
Fix missing free reported by Coverity
Signed-off-by: Arne Schwabe <arne@rfc2549.org>
Diffstat (limited to 'main')
-rw-r--r--main/src/main/cpp/ovpnutil/sslspeed.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/main/src/main/cpp/ovpnutil/sslspeed.c b/main/src/main/cpp/ovpnutil/sslspeed.c
index 7468e23b..a1703ea2 100644
--- a/main/src/main/cpp/ovpnutil/sslspeed.c
+++ b/main/src/main/cpp/ovpnutil/sslspeed.c
@@ -321,12 +321,14 @@ jdoubleArray Java_de_blinkt_openvpn_core_NativeUtils_getOpenSSLSpeed(JNIEnv* env
// print_result(D_EVP, testnum, count, d);
OSSL_LIB_CTX_free(lib_ctx);
+ free(loopargs);
return ret;
error:
- free(loopargs);
- for (int k = 0; k < loopargs_len; k++) {
+ for (int k = 0; k < loopargs_len; k++) {
EVP_CIPHER_CTX_free(loopargs[k].ctx);
}
- OSSL_LIB_CTX_free(lib_ctx);
+ free(loopargs);
+
+ OSSL_LIB_CTX_free(lib_ctx);
return NULL;
}