mirror of
https://github.com/openembedded/meta-openembedded.git
synced 2026-04-20 23:48:20 +00:00
Revert "net-snmp: fix memory leak"
This reverts commit d0c2a3d383.
Please revert my patch.
After I rebase the latest codes from kirkstone. I found my patch had a bad character. This caused net-snmp do_patch failure.
After some tries, I still failed to resolve this.
The cherry-pick in my side picked copyright change. But after sending the patch via git send-mail, the character changed.
Sorry again.
Thanks.
Jinfeng
Signed-off-by: Armin Kuster <akuster808@gmail.com>
This commit is contained in:
@@ -1,40 +0,0 @@
|
|||||||
From 4bd0d9a8a2860c2c46307aef5ee1ccc69f7e3b62 Mon Sep 17 00:00:00 2001
|
|
||||||
From: JanSoundhouse <jan.sondhauss@wago.com>
|
|
||||||
Date: Mon, 5 Sep 2022 11:25:58 +0200
|
|
||||||
Subject: [PATCH] unload_all_mibs: fix memory leak by freeing tclist
|
|
||||||
|
|
||||||
tclist is always allocated in netsnmp_init_mib_internals, when doing multiple init_snmp("")/snmp_shutdown("") this memory is never free'd.
|
|
||||||
|
|
||||||
Upstream-Status: Backport [https://github.com/net-snmp/net-snmp/commit/4bd0d9a8a2860c2c46307aef5ee1ccc69f7e3b62]
|
|
||||||
|
|
||||||
Signed-off-by: Jinfeng Wang <jinfeng.wang.cn@windriver.com>
|
|
||||||
---
|
|
||||||
snmplib/parse.c | 5 +++--
|
|
||||||
1 file changed, 3 insertions(+), 2 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/snmplib/parse.c b/snmplib/parse.c
|
|
||||||
index b3e2f3ae5c..71bdf75ff8 100644
|
|
||||||
--- a/snmplib/parse.c
|
|
||||||
+++ b/snmplib/parse.c
|
|
||||||
@@ -28,7 +28,7 @@ ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
|
|
||||||
SOFTWARE.
|
|
||||||
******************************************************************/
|
|
||||||
/*
|
|
||||||
- * Copyright <20> 2003 Sun Microsystems, Inc. All rights reserved.
|
|
||||||
+ * Copyright © 2003 Sun Microsystems, Inc. All rights reserved.
|
|
||||||
* Use is subject to license terms specified in the COPYING file
|
|
||||||
* distributed with the Net-SNMP package.
|
|
||||||
*/
|
|
||||||
@@ -4215,7 +4215,8 @@ unload_all_mibs(void)
|
|
||||||
if (ptc->description)
|
|
||||||
free(ptc->description);
|
|
||||||
}
|
|
||||||
- memset(tclist, 0, tc_alloc * sizeof(struct tc));
|
|
||||||
+ SNMP_FREE(tclist);
|
|
||||||
+ tc_alloc = 0;
|
|
||||||
|
|
||||||
memset(buckets, 0, sizeof(buckets));
|
|
||||||
memset(nbuckets, 0, sizeof(nbuckets));
|
|
||||||
--
|
|
||||||
2.34.1
|
|
||||||
|
|
||||||
@@ -27,7 +27,6 @@ SRC_URI = "${SOURCEFORGE_MIRROR}/net-snmp/net-snmp-${PV}.tar.gz \
|
|||||||
file://reproducibility-have-printcap.patch \
|
file://reproducibility-have-printcap.patch \
|
||||||
file://0001-ac_add_search_path.m4-keep-consistent-between-32bit.patch \
|
file://0001-ac_add_search_path.m4-keep-consistent-between-32bit.patch \
|
||||||
file://CVE-2022-44792-CVE-2022-44793.patch \
|
file://CVE-2022-44792-CVE-2022-44793.patch \
|
||||||
file://0001-unload_all_mibs-fix-memory-leak-by-freeing-tclist.patch \
|
|
||||||
"
|
"
|
||||||
SRC_URI[sha256sum] = "2097f29b7e1bf3f1300b4bae52fa2308d0bb8d5d3998dbe02f9462a413a2ef0a"
|
SRC_URI[sha256sum] = "2097f29b7e1bf3f1300b4bae52fa2308d0bb8d5d3998dbe02f9462a413a2ef0a"
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user