From 0d609c451bfd55d618aa425bb0967fa84ce7982d Mon Sep 17 00:00:00 2001 From: dongjiuzhu1 Date: Mon, 22 Apr 2024 19:49:59 +0800 Subject: [PATCH] Revert "fix: the bug about rwbuffer causing mem overflow" This reverts commit e43aa99ae8751d3cfb845bd20ab491680b6b409c. Signed-off-by: dongjiuzhu1 --- drivers/misc/rwbuffer.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/misc/rwbuffer.c b/drivers/misc/rwbuffer.c index 8468b56132..009756c1a0 100644 --- a/drivers/misc/rwbuffer.c +++ b/drivers/misc/rwbuffer.c @@ -819,7 +819,7 @@ int rwb_initialize(FAR struct rwbuffer_s *rwb) /* Allocate the write buffer */ - allocsize = rwb->wrmaxblocks * rwb->blocksize * 2; + allocsize = rwb->wrmaxblocks * rwb->blocksize; rwb->wrbuffer = kmm_malloc(allocsize); if (!rwb->wrbuffer) {