Commit e03ddfae authored by Ben Laurie's avatar Ben Laurie
Browse files

Accept NULL in *_free.

parent 6fa89f94
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -5,6 +5,9 @@

 Changes between 0.9.1c and 0.9.2

  *) Make _all_ *_free functions accept a NULL pointer.
     [Frans Heymans <fheymans@isaserver.be>]

  *) If a DH key is generated in s3_srvr.c, don't blow it by trying to use
     NULL pointers.
     [Anonymous <nobody@replay.com>]
+3 −0
Original line number Diff line number Diff line
@@ -267,6 +267,9 @@ PKCS7 *a;
void PKCS7_content_free(a)
PKCS7 *a;
	{
	if(a == NULL)
	    return;

	if (a->asn1 != NULL) Free((char *)a->asn1);

	if (a->d.ptr != NULL)
+3 −0
Original line number Diff line number Diff line
@@ -263,6 +263,9 @@ X509_NAME_ENTRY *X509_NAME_ENTRY_new()
void X509_NAME_free(a)
X509_NAME *a;
	{
	if(a == NULL)
	    return;

	BUF_MEM_free(a->bytes);
	sk_pop_free(a->entries,X509_NAME_ENTRY_free);
	Free((char *)a);
+3 −0
Original line number Diff line number Diff line
@@ -310,6 +310,9 @@ struct hostent *a;
	{
	int i;

	if(a == NULL)
	    return;

	if (a->h_aliases != NULL)
		{
		for (i=0; a->h_aliases[i] != NULL; i++)
+3 −0
Original line number Diff line number Diff line
@@ -173,6 +173,9 @@ BIO_ACCEPT *BIO_ACCEPT_new()
void BIO_ACCEPT_free(a)
BIO_ACCEPT *a;
	{
	if(a == NULL)
	    return;

	if (a->param_addr != NULL) Free(a->param_addr);
	if (a->addr != NULL) Free(a->addr);
	if (a->bio_chain != NULL) BIO_free(a->bio_chain);
Loading