From: "Haidong Yu" Subject: [PATCH] conhost: Fix a memory leak. Message-Id: <3b5ad4ac.18e6.174b3902021.Coremail.yhd986@163.com> Date: Tue, 22 Sep 2020 10:06:41 +0800 (CST) From fb244a3c6136401fca444eaf9c2599f11d0d3978 Mon Sep 17 00:00:00 2001 From: Haidong Yu Date: Tue, 22 Sep 2020 10:01:47 +0800 Subject: [PATCH] conhost: Fix a memory leak. Signed-off-by: Haidong Yu --- programs/conhost/conhost.c | 1 + 1 file changed, 1 insertion(+) diff --git a/programs/conhost/conhost.c b/programs/conhost/conhost.c index c0a0e08e6d..4a16ae868d 100644 --- a/programs/conhost/conhost.c +++ b/programs/conhost/conhost.c @@ -213,6 +213,7 @@ static struct screen_buffer *create_screen_buffer( struct console *console, int if (wine_rb_put( &screen_buffer_map, LongToPtr(id), &screen_buffer->entry )) { + free( screen_buffer ); ERR( "id %x already exists\n", id ); return NULL; } -- 2.20.1