]> git.ipfire.org Git - thirdparty/openssl.git/blobdiff - crypto/asn1/a_mbstr.c
free null cleanup finale
[thirdparty/openssl.git] / crypto / asn1 / a_mbstr.c
index 6935efe09fb5080d39f8f3177e5160d897f7d31f..2ff496b4fd3573c9c50cc60258b2251f4758750a 100644 (file)
@@ -190,11 +190,9 @@ int ASN1_mbstring_ncopy(ASN1_STRING **out, const unsigned char *in, int len,
     if (*out) {
         free_out = 0;
         dest = *out;
-        if (dest->data) {
-            dest->length = 0;
-            OPENSSL_free(dest->data);
-            dest->data = NULL;
-        }
+        OPENSSL_free(dest->data);
+        dest->data = NULL;
+        dest->length = 0;
         dest->type = str_type;
     } else {
         free_out = 1;