0
0
mirror of https://gitlab.nic.cz/labs/bird.git synced 2024-12-26 03:31:54 +00:00

MRT Table Dump: Bugfix buffer memory reallocation

This commit is contained in:
Pavel Tvrdík 2015-08-03 13:03:40 +02:00
parent f7385b42a4
commit 0722998578

View File

@ -42,7 +42,7 @@ mrt_buffer_free(struct mrt_buffer *buf)
static void static void
mrt_buffer_enlarge(struct mrt_buffer *buf, size_t min_required_capacity) mrt_buffer_enlarge(struct mrt_buffer *buf, size_t min_required_capacity)
{ {
if (min_required_capacity < buf->msg_capacity) if (min_required_capacity > buf->msg_capacity)
{ {
buf->msg_capacity *= 2; buf->msg_capacity *= 2;
if (min_required_capacity > buf->msg_capacity) if (min_required_capacity > buf->msg_capacity)