Make OPENSSL_NO_COMP compile again.
[oweals/openssl.git] / crypto / asn1 / a_type.c
index fe3fcd40b0b24be71bb4afdd06d7433ae3b72b24..a6acef16f3b3f27a5a51182ef289ced8796b562e 100644 (file)
@@ -57,8 +57,8 @@
  */
 
 #include <stdio.h>
-#include <openssl/asn1t.h>
 #include "cryptlib.h"
+#include <openssl/asn1t.h>
 
 int ASN1_TYPE_get(ASN1_TYPE *a)
        {
@@ -71,7 +71,10 @@ int ASN1_TYPE_get(ASN1_TYPE *a)
 void ASN1_TYPE_set(ASN1_TYPE *a, int type, void *value)
        {
        if (a->value.ptr != NULL)
-               ASN1_primitive_free((ASN1_VALUE **)&a, NULL);
+               {
+               ASN1_TYPE **tmp_a = &a;
+               ASN1_primitive_free((ASN1_VALUE **)tmp_a, NULL);
+               }
        a->type=type;
        a->value.ptr=value;
        }