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

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