lldpad/huawei-lldpad-stop-cause-coredump.patch

26 lines
692 B
Diff
Raw Normal View History

2024-10-10 13:13:10 +08:00
From 175fc335301e78b7cf321faecd8b1430291e3723 Mon Sep 17 00:00:00 2001
From: yangchen <yangchen145@huawei.com>
Date: Thu, 10 Oct 2024 12:29:56 +0800
Subject: [PATCH] lldpad stop cause coredump
---
lldp_dcbx.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/lldp_dcbx.c b/lldp_dcbx.c
index 66df857..1309c49 100644
--- a/lldp_dcbx.c
+++ b/lldp_dcbx.c
@@ -369,6 +369,8 @@ static void dcbx_free_data(struct dcbd_user_data *dud)
if (dud) {
while (!LIST_EMPTY(&dud->head)) {
dd = LIST_FIRST(&dud->head);
+ if (dd->entry.le_next == NULL && dd->entry.le_prev == NULL)
+ break;
LIST_REMOVE(dd, entry);
dcbx_free_tlv(dd);
dcbx_free_manifest(dd->manifest);
--
2.33.0