From e3ef13ddb4570e87ea3320eea62472479e57d52f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Love=20H=C3=B6rnquist=20=C3=85strand?= Date: Mon, 27 Mar 2006 21:34:13 +0000 Subject: [PATCH] (hx509_cert_free): ok to free NULL git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@16836 ec53bebd-3082-4978-b11e-865c3cabbd6b --- lib/hx509/cert.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/hx509/cert.c b/lib/hx509/cert.c index c12207681..0374f1521 100644 --- a/lib/hx509/cert.c +++ b/lib/hx509/cert.c @@ -205,6 +205,9 @@ hx509_cert_free(hx509_cert cert) { int i; + if (cert == NULL) + return; + if (cert->ref <= 0) _hx509_abort("refcount <= 0"); if (--cert->ref > 0)