a092ae
diff -urNp a/snmplib/cert_util.c b/snmplib/cert_util.c
a092ae
--- a/snmplib/cert_util.c	2021-12-09 08:45:23.217942229 +0100
a092ae
+++ b/snmplib/cert_util.c	2021-12-09 08:46:56.567562352 +0100
a092ae
@@ -1368,8 +1368,7 @@ _add_certfile(const char* dirname, const
a092ae
 
a092ae
            okey = PEM_read_bio_PrivateKey(certbio, NULL, NULL, NULL);
a092ae
            if (NULL == okey)
a092ae
-               snmp_log(LOG_ERR, "error parsing key file %s\n",
a092ae
-                     key->info.filename);
a092ae
+               snmp_log(LOG_ERR, "error parsing key file %s\n", filename);
a092ae
            else {
a092ae
                key = _add_key(okey, dirname, filename, index);
a092ae
                if (NULL == key) {