!173 Fix memory leak in omazureeventhubs on accepted PN_DELIVERY event

From: @jamesblunt 
Reviewed-by: @dillon_chen 
Signed-off-by: @dillon_chen
This commit is contained in:
openeuler-ci-bot 2024-08-21 07:40:35 +00:00 committed by Gitee
commit b022d071fb
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
2 changed files with 45 additions and 1 deletions

View File

@ -0,0 +1,37 @@
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

View File

@ -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 <zhangyaqi@kylinos.cn> - 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 <zhangqiumiao1@huawei.com> - 8.2312.0-5
- Type:bugfix
- ID:NA