rsyslog/backport-fix-memory-leak-in-omazureeventhubs-on-accepted-PN_D.patch

38 lines
1.3 KiB
Diff
Raw Normal View History

From 0b82b8e09d463312768c2da13af0410149d0e643 Mon Sep 17 00:00:00 2001
From: ydu <ydu@ubiqube.com>
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