Blame SOURCES/rsyslog-8.2102.0-nsd_ossl-memory-leak.patch

537b07
diff --git a/runtime/nsd_ossl.c b/runtime/nsd_ossl.c
537b07
index 79347916e4..69ec57af09 100644
537b07
--- a/runtime/nsd_ossl.c
537b07
+++ b/runtime/nsd_ossl.c
537b07
@@ -1821,11 +1821,8 @@ BIO_set_nbio( conn, 1 );
537b07
 }
537b07
 
537b07
 
537b07
-/* Empty wrapper for GNUTLS helper function
537b07
- * TODO: implement a similar capability
537b07
- */
537b07
 static rsRetVal
537b07
-SetGnutlsPriorityString(__attribute__((unused)) nsd_t *pNsd, __attribute__((unused)) uchar *gnutlsPriorityString)
537b07
+SetGnutlsPriorityString(nsd_t *const pNsd, uchar *const gnutlsPriorityString)
537b07
 {
537b07
 	DEFiRet;
537b07
 	nsd_ossl_t* pThis = (nsd_ossl_t*) pNsd;
537b07
@@ -1905,6 +1902,7 @@ SetGnutlsPriorityString(__attribute__((unused)) nsd_t *pNsd, __attribute__((unus
537b07
 						pThis->gnutlsPriorityString);
537b07
 				osslLastSSLErrorMsg(0, NULL, LOG_ERR, "SetGnutlsPriorityString");
537b07
 			}
537b07
+			SSL_CONF_CTX_free(cctx);
537b07
 		}
537b07
 #else
537b07
 		dbgprintf("gnutlsPriorityString: set to '%s'\n", gnutlsPriorityString);