Skip to content

Commit

Permalink
weston-debug: Handle destruction of stream description
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
Marius Vlad committed Jun 1, 2021
1 parent cdeeb88 commit 568d04f
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions clients/weston-debug.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down

0 comments on commit 568d04f

Please sign in to comment.