From 44351435e28c6c878bf0a9054cb002704312d60e Mon Sep 17 00:00:00 2001 From: Felix Fietkau Date: Sun, 19 Nov 2023 16:11:40 +0100 Subject: [PATCH] lib: unmap full ring buffer Signed-off-by: Felix Fietkau --- lib.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib.c b/lib.c index c545816..ec8c23d 100644 --- a/lib.c +++ b/lib.c @@ -525,7 +525,7 @@ void udebug_buf_free(struct udebug_buf *buf) if (ctx && ctx->fd.fd >= 0) udebug_buf_msg(buf, CL_MSG_RING_REMOVE); - munmap(buf->hdr, buf->head_size + buf->data_size); + munmap(buf->hdr, buf->head_size + 2 * buf->data_size); close(buf->fd); memset(buf, 0, sizeof(*buf)); } -- 2.30.2