diff options
| author | Armin Kuster <akuster808@gmail.com> | 2025-03-16 10:34:18 -0400 |
|---|---|---|
| committer | Armin Kuster <akuster808@gmail.com> | 2025-03-20 09:56:59 -0400 |
| commit | 084df16f561ebce5aea2ae9241cc500247771ef3 (patch) | |
| tree | f742767871d88004132c8806ac8523d93f00b017 /meta-networking | |
| parent | d5fb81cbfb9c4f0893daf8fca5d5a471768a5172 (diff) | |
| download | meta-openembedded-084df16f561ebce5aea2ae9241cc500247771ef3.tar.gz | |
Revert "net-snmp: fix memory leak"
This reverts commit d0c2a3d383dac9fe7e85b7d87784b7f5b5c62c5e.
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>
Diffstat (limited to 'meta-networking')
| -rw-r--r-- | meta-networking/recipes-protocols/net-snmp/net-snmp/0001-unload_all_mibs-fix-memory-leak-by-freeing-tclist.patch | 40 | ||||
| -rw-r--r-- | meta-networking/recipes-protocols/net-snmp/net-snmp_5.9.3.bb | 1 |
2 files changed, 0 insertions, 41 deletions
diff --git a/meta-networking/recipes-protocols/net-snmp/net-snmp/0001-unload_all_mibs-fix-memory-leak-by-freeing-tclist.patch b/meta-networking/recipes-protocols/net-snmp/net-snmp/0001-unload_all_mibs-fix-memory-leak-by-freeing-tclist.patch deleted file mode 100644 index cc498c7fc9..0000000000 --- a/meta-networking/recipes-protocols/net-snmp/net-snmp/0001-unload_all_mibs-fix-memory-leak-by-freeing-tclist.patch +++ /dev/null | |||
| @@ -1,40 +0,0 @@ | |||
| 1 | From 4bd0d9a8a2860c2c46307aef5ee1ccc69f7e3b62 Mon Sep 17 00:00:00 2001 | ||
| 2 | From: JanSoundhouse <jan.sondhauss@wago.com> | ||
| 3 | Date: Mon, 5 Sep 2022 11:25:58 +0200 | ||
| 4 | Subject: [PATCH] unload_all_mibs: fix memory leak by freeing tclist | ||
| 5 | |||
| 6 | tclist is always allocated in netsnmp_init_mib_internals, when doing multiple init_snmp("")/snmp_shutdown("") this memory is never free'd. | ||
| 7 | |||
| 8 | Upstream-Status: Backport [https://github.com/net-snmp/net-snmp/commit/4bd0d9a8a2860c2c46307aef5ee1ccc69f7e3b62] | ||
| 9 | |||
| 10 | Signed-off-by: Jinfeng Wang <jinfeng.wang.cn@windriver.com> | ||
| 11 | --- | ||
| 12 | snmplib/parse.c | 5 +++-- | ||
| 13 | 1 file changed, 3 insertions(+), 2 deletions(-) | ||
| 14 | |||
| 15 | diff --git a/snmplib/parse.c b/snmplib/parse.c | ||
| 16 | index b3e2f3ae5c..71bdf75ff8 100644 | ||
| 17 | --- a/snmplib/parse.c | ||
| 18 | +++ b/snmplib/parse.c | ||
| 19 | @@ -28,7 +28,7 @@ ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS | ||
| 20 | SOFTWARE. | ||
| 21 | ******************************************************************/ | ||
| 22 | /* | ||
| 23 | - * Copyright � 2003 Sun Microsystems, Inc. All rights reserved. | ||
| 24 | + * Copyright © 2003 Sun Microsystems, Inc. All rights reserved. | ||
| 25 | * Use is subject to license terms specified in the COPYING file | ||
| 26 | * distributed with the Net-SNMP package. | ||
| 27 | */ | ||
| 28 | @@ -4215,7 +4215,8 @@ unload_all_mibs(void) | ||
| 29 | if (ptc->description) | ||
| 30 | free(ptc->description); | ||
| 31 | } | ||
| 32 | - memset(tclist, 0, tc_alloc * sizeof(struct tc)); | ||
| 33 | + SNMP_FREE(tclist); | ||
| 34 | + tc_alloc = 0; | ||
| 35 | |||
| 36 | memset(buckets, 0, sizeof(buckets)); | ||
| 37 | memset(nbuckets, 0, sizeof(nbuckets)); | ||
| 38 | -- | ||
| 39 | 2.34.1 | ||
| 40 | |||
diff --git a/meta-networking/recipes-protocols/net-snmp/net-snmp_5.9.3.bb b/meta-networking/recipes-protocols/net-snmp/net-snmp_5.9.3.bb index 88466c94b4..eb8e1599fb 100644 --- a/meta-networking/recipes-protocols/net-snmp/net-snmp_5.9.3.bb +++ b/meta-networking/recipes-protocols/net-snmp/net-snmp_5.9.3.bb | |||
| @@ -27,7 +27,6 @@ SRC_URI = "${SOURCEFORGE_MIRROR}/net-snmp/net-snmp-${PV}.tar.gz \ | |||
| 27 | file://reproducibility-have-printcap.patch \ | 27 | file://reproducibility-have-printcap.patch \ |
| 28 | file://0001-ac_add_search_path.m4-keep-consistent-between-32bit.patch \ | 28 | file://0001-ac_add_search_path.m4-keep-consistent-between-32bit.patch \ |
| 29 | file://CVE-2022-44792-CVE-2022-44793.patch \ | 29 | file://CVE-2022-44792-CVE-2022-44793.patch \ |
| 30 | file://0001-unload_all_mibs-fix-memory-leak-by-freeing-tclist.patch \ | ||
| 31 | " | 30 | " |
| 32 | SRC_URI[sha256sum] = "2097f29b7e1bf3f1300b4bae52fa2308d0bb8d5d3998dbe02f9462a413a2ef0a" | 31 | SRC_URI[sha256sum] = "2097f29b7e1bf3f1300b4bae52fa2308d0bb8d5d3998dbe02f9462a413a2ef0a" |
| 33 | 32 | ||
