Fixes a potential double-free issue in tls_ctx_load_cert_uri()
by explicitly nullifying the pointer immediately after calling
OSSL_STORE_INFO_free(info).
This ensures that subsequent cleanup won't attempt to free the same
structure again.
Github: closes OpenVPN/openvpn#726
Change-Id: I4507be07cd5573b2117e837ef03187535a38a4b1
Signed-off-by: Lev Stipakov <lev@openvpn.net>
Acked-by: Antonio Quartulli <antonio@mandelbit.com>
Message-Id: <
20250417134636.21279-1-gert@greenie.muc.de>
URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg31478.html
Signed-off-by: Gert Doering <gert@greenie.muc.de>
goto end;
}
OSSL_STORE_INFO_free(info);
+ info = NULL;
/* iterate through the store and add extra certificates if any to the chain */
while (!OSSL_STORE_eof(store_ctx))
break;
}
OSSL_STORE_INFO_free(info);
+ info = NULL;
}
end: