summaryrefslogtreecommitdiff
path: root/proto/bmp
diff options
context:
space:
mode:
authorOndrej Zajicek (work) <santiago@crfreenet.org>2021-04-15 18:32:47 +0200
committerOndrej Zajicek <santiago@crfreenet.org>2023-04-16 20:06:02 +0200
commit3925e65938e7c778f650d62a721dec7a66c19ab3 (patch)
tree7c5c389d0feae117758429b50b50da0491812ac1 /proto/bmp
parent4d56b70dc5facdf4b839b76bf80c93856bcbb121 (diff)
BMP: Add some missing bmp_buffer_free() calls
They were inadvertently removed during recent code refactoring. Thanks to Dawid Macek for the bugreport and patch.
Diffstat (limited to 'proto/bmp')
-rw-r--r--proto/bmp/bmp.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/proto/bmp/bmp.c b/proto/bmp/bmp.c
index 550e4c18..dbbb5e0c 100644
--- a/proto/bmp/bmp.c
+++ b/proto/bmp/bmp.c
@@ -277,6 +277,7 @@ bmp_startup(struct bmp_proto *p)
buffer payload = bmp_buffer_alloc(p->buffer_mpool, DEFAULT_MEM_BLOCK_SIZE);
bmp_init_msg_serialize(&payload, p->sys_descr, p->sys_name);
bmp_schedule_tx_packet(p, bmp_buffer_data(&payload), bmp_buffer_pos(&payload));
+ bmp_buffer_free(&payload);
p->started = true;
}
@@ -661,6 +662,7 @@ bmp_send_peer_up_notif_msg(struct bmp_proto *p, const struct bgp_proto *bgp,
sk->saddr, sk->daddr, sk->sport, sk->dport, tx_data, tx_data_size,
rx_data, rx_data_size);
bmp_schedule_tx_packet(p, bmp_buffer_data(&payload), bmp_buffer_pos(&payload));
+ bmp_buffer_free(&payload);
bmp_peer_up(bgp);
}
@@ -849,6 +851,9 @@ bmp_route_monitor_update_in_pre_commit(const struct bgp_proto *bgp)
bmp_buffer_flush(&payload);
bmp_buffer_flush(&update_msgs);
}
+
+ bmp_buffer_free(&payload);
+ bmp_buffer_free(&update_msgs);
}
void