dmalloc / asn1 parser [patch]
Neil Spring
nspring@cs.washington.edu
Sat Oct 6 23:49:02 2001
When I add the following patch, dmalloc no longer complains
about trying to free a null pointer. This may be related
to my certificate parsing woes.
-neil
diff -u x509_asn1.c.old x509_asn1.c
--- x509_asn1.c.old Mon Oct 1 18:03:41 2001
+++ x509_asn1.c Mon Oct 1 18:04:32 2001
@@ -187,8 +187,10 @@
if(node==NULL) return;
- gnutls_free(node->name);
- gnutls_free(node->value);
+ if(node->name!=NULL)
+ gnutls_free(node->name);
+ if(node->value!=NULL)
+ gnutls_free(node->value);
gnutls_free(node);
}