fix route_bgp/route_ping: old paths queue leak, etcp_send fail leak, nat_check_arg leak on cancel

This commit is contained in:
Evgeny committed 2026-05-14 03:40:24 +03:00
1 parent 5aa9bdbd64
commit d6c6ca9eb3
2 files changed
+4

No files matched your search

+3
View File
@@ -760,6 +760,7 @@ int route_bgp_process_nodeinfo(struct ROUTE_BGP* bgp, struct ETCP_CONN* from, co
if (need_alloc) {
if (nodeinfo1) {
queue_remove_data(bgp->nodes, &nodeinfo1->ll);
queue_free(paths);
queue_entry_free(&nodeinfo1->ll);
}
nodeinfo1 = (struct NODEINFO_Q*)queue_entry_new(new_data_size);
@@ -904,6 +905,8 @@ void route_bgp_send_nodeinfo(struct NODEINFO_Q* node, struct ETCP_CONN* conn) {
int ret = etcp_send(conn, e);
if (ret != 0) {
DEBUG_ERROR(DEBUG_CATEGORY_BGP, "etcp_send NODEINFO failed: %d", ret);
u_free(p);
queue_entry_free(e);
}
}
+1
View File
@@ -131,6 +131,7 @@ void route_ping_cancel_for_conn(struct ROUTE_BGP* bgp, struct ETCP_CONN* conn) {
}
p->cancelled = 1;
na->link = NULL;
u_free(na);
u_free(p);
cancelled++;
DEBUG_INFO(DEBUG_CATEGORY_BGP, "cancel_for_conn: cancelled req_id=%016llx",