From 568d04ff11aac38ee1871efa13805656f5ab6168 Mon Sep 17 00:00:00 2001 From: Marius Vlad Date: Tue, 1 Jun 2021 11:26:24 +0300 Subject: [PATCH] weston-debug: Handle destruction of stream description Memleak found by ASAN: Direct leak of 258 byte(s) in 8 object(s) allocated from: #0 0x7f3eedb6e817 in __interceptor_strdup (/usr/lib/x86_64-linux-gnu/libasan.so.6+0x57817) #1 0x55821ce5e6a5 in stream_alloc ../clients/weston-debug.c:94 #2 0x55821ce5e974 in stream_find ../clients/weston-debug.c:128 #3 0x55821ce5eb15 in debug_advertise ../clients/weston-debug.c:157 #4 0x7f3eed7b4d1c (/usr/lib/x86_64-linux-gnu/libffi.so.7+0x6d1c) Signed-off-by: Marius Vlad --- clients/weston-debug.c | 1 + 1 file changed, 1 insertion(+) diff --git a/clients/weston-debug.c b/clients/weston-debug.c index 3060dec9..187fc874 100644 --- a/clients/weston-debug.c +++ b/clients/weston-debug.c @@ -135,6 +135,7 @@ stream_destroy(struct debug_stream *stream) weston_debug_stream_v1_destroy(stream->obj); wl_list_remove(&stream->link); + free(stream->desc); free(stream->name); free(stream); }