From a404c9bd161ec5d23c60fa661c9737e303e3cd65 Mon Sep 17 00:00:00 2001 From: Bart Van Assche Date: Sat, 4 Jan 2020 14:07:54 -0800 Subject: [PATCH] t/memlock: Free allocated memory This patch fixes the following Coverity complaint: CID 280679: Resource leaks (RESOURCE_LEAK) Variable "buf" going out of scope leaks the storage it points to. Signed-off-by: Bart Van Assche --- t/memlock.c | 1 + 1 file changed, 1 insertion(+) diff --git a/t/memlock.c b/t/memlock.c index 3d3579ad..ebedb91d 100644 --- a/t/memlock.c +++ b/t/memlock.c @@ -26,6 +26,7 @@ static void *worker(void *data) first = 0; } } + free(buf); return NULL; } -- 2.25.1