diff options
Diffstat (limited to 'src/3rdparty/open62541/open62541.c')
-rw-r--r-- | src/3rdparty/open62541/open62541.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/3rdparty/open62541/open62541.c b/src/3rdparty/open62541/open62541.c index 2ca1f25..041cd56 100644 --- a/src/3rdparty/open62541/open62541.c +++ b/src/3rdparty/open62541/open62541.c @@ -60855,8 +60855,11 @@ UA_OpenSSL_LoadLocalCertificate(const UA_ByteString *certificate, UA_ByteString X509_free(cert); if (length > 0) { - target->length = (size_t) length; - target->data = derData; + UA_ByteString temp; + temp.length = (size_t) length; + temp.data = derData; + UA_ByteString_copy(&temp, target); + OPENSSL_free(derData); return UA_STATUSCODE_GOOD; } |