From 1ed1bae4d9c1c818066b6606eeed886e1daa9fb2 Mon Sep 17 00:00:00 2001 From: Zhang Yaqi Date: Fri, 16 Aug 2024 11:19:03 +0800 Subject: [PATCH] Fix memory leak in omazureeventhubs on accepted PN_DELIVERY event --- ...in-omazureeventhubs-on-accepted-PN_D.patch | 37 +++++++++++++++++++ rsyslog.spec | 9 ++++- 2 files changed, 45 insertions(+), 1 deletion(-) create mode 100644 backport-fix-memory-leak-in-omazureeventhubs-on-accepted-PN_D.patch diff --git a/backport-fix-memory-leak-in-omazureeventhubs-on-accepted-PN_D.patch b/backport-fix-memory-leak-in-omazureeventhubs-on-accepted-PN_D.patch new file mode 100644 index 0000000..81def18 --- /dev/null +++ b/backport-fix-memory-leak-in-omazureeventhubs-on-accepted-PN_D.patch @@ -0,0 +1,37 @@ +From 0b82b8e09d463312768c2da13af0410149d0e643 Mon Sep 17 00:00:00 2001 +From: ydu +Date: Fri, 14 Jun 2024 16:59:38 +0200 +Subject: [PATCH] Fix memory leak in omazureeventhubs on accepted PN_DELIVERY + event + +- Fix units in a comment of omazureeventhubs +Reference:https://github.com/rsyslog/rsyslog/commit/0b82b8e09d463312768c2da13af0410149d0e643 +Conflict:NA +--- + plugins/omazureeventhubs/omazureeventhubs.c | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/plugins/omazureeventhubs/omazureeventhubs.c b/plugins/omazureeventhubs/omazureeventhubs.c +index a2bd8b3..c723b6a 100644 +--- a/plugins/omazureeventhubs/omazureeventhubs.c ++++ b/plugins/omazureeventhubs/omazureeventhubs.c +@@ -727,7 +727,7 @@ CODESTARTcommitTransaction + } + bDone = 1; + +- // Wait 100 microseconds ++ // Wait 100 milliseconds + srSleep(0, 100000); + + // Verify if messages have been submitted successfully +@@ -1283,6 +1283,7 @@ handleProton(wrkrInstanceData_t *const pWrkrData, pn_event_t *event) { + iQueueNum, + pWrkrData->nMaxProtonMsgs, + pWrkrData, pData->azurehost, pData->azureport, pData->container); ++ pn_delivery_settle(pDeliveryStatus); // free the delivered message + pMsgEntry->status = PROTON_ACCEPTED; + + // Increment Stats Counter +-- +2.27.0 + diff --git a/rsyslog.spec b/rsyslog.spec index 1236dce..dc3b3b0 100644 --- a/rsyslog.spec +++ b/rsyslog.spec @@ -7,7 +7,7 @@ Name: rsyslog Version: 8.2312.0 -Release: 5 +Release: 6 Summary: The rocket-fast system for log processing License: (GPLv3+ and ASL 2.0) URL: http://www.rsyslog.com/ @@ -32,6 +32,7 @@ Patch9005: print-main-queue-info-to-journal-when-receive-USR1-signal.patch Patch6000: backport-outchannel-eleminate-type-cast-for-compatibility-rea.patch Patch6001: backport-fix-printing-of-time_t-values.patch Patch6002: backport-omfile-do-not-carry-out-actual-action-when-writing-to-dev-null.patch +Patch6003: backport-fix-memory-leak-in-omazureeventhubs-on-accepted-PN_D.patch Patch9006: tls-bugfix-parameter-StreamDriver_CRLFile-not-known.patch @@ -510,6 +511,12 @@ done %{_mandir}/man1/rscryutil.1.gz %changelog +* Fri Aug 16 2024 zhangyaqi - 8.2312.0-6 +- Type:bugfix +- ID:NA +- SUG:NA +- DESC:Fix memory leak in omazureeventhubs on accepted PN_DELIVERY event + * Fri Jun 21 2024 zhangqiumiao - 8.2312.0-5 - Type:bugfix - ID:NA -- Gitee