X-Git-Url: https://git.librecmc.org/?a=blobdiff_plain;f=crypto%2Fasn1%2Fx_info.c;h=d44f6cdb0197a2133d2d065a0224fe99ee0b4fce;hb=6446e0c3c8286428374ec738ffdc859802bd3c92;hp=e46c67298f3ab31d33945c3504b8555ce450ed03;hpb=d02b48c63a58ea4367a0e905979f140b7d090f86;p=oweals%2Fopenssl.git diff --git a/crypto/asn1/x_info.c b/crypto/asn1/x_info.c index e46c67298f..d44f6cdb01 100644 --- a/crypto/asn1/x_info.c +++ b/crypto/asn1/x_info.c @@ -1,5 +1,5 @@ /* crypto/asn1/x_info.c */ -/* Copyright (C) 1995-1997 Eric Young (eay@cryptsoft.com) +/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) * All rights reserved. * * This package is an SSL implementation written @@ -58,15 +58,15 @@ #include #include "cryptlib.h" -#include "evp.h" -#include "asn1_mac.h" -#include "x509.h" +#include +#include +#include -X509_INFO *X509_INFO_new() +X509_INFO *X509_INFO_new(void) { X509_INFO *ret=NULL; - ret=(X509_INFO *)Malloc(sizeof(X509_INFO)); + ret=(X509_INFO *)OPENSSL_malloc(sizeof(X509_INFO)); if (ret == NULL) { ASN1err(ASN1_F_X509_INFO_NEW,ERR_R_MALLOC_FAILURE); @@ -84,14 +84,16 @@ X509_INFO *X509_INFO_new() return(ret); } -void X509_INFO_free(x) -X509_INFO *x; +void X509_INFO_free(X509_INFO *x) { int i; if (x == NULL) return; i=CRYPTO_add(&x->references,-1,CRYPTO_LOCK_X509_INFO); +#ifdef REF_PRINT + REF_PRINT("X509_INFO",x); +#endif if (i > 0) return; #ifdef REF_CHECK if (i < 0) @@ -104,5 +106,9 @@ X509_INFO *x; if (x->x509 != NULL) X509_free(x->x509); if (x->crl != NULL) X509_CRL_free(x->crl); if (x->x_pkey != NULL) X509_PKEY_free(x->x_pkey); - Free((char *)x); + if (x->enc_data != NULL) OPENSSL_free(x->enc_data); + OPENSSL_free(x); } + +IMPLEMENT_STACK_OF(X509_INFO) +