From 3a61da8ce9404cda4b1df1c29d38367ef650b805 Mon Sep 17 00:00:00 2001 From: Luiz Augusto von Dentz Date: Tue, 9 Nov 2021 13:50:38 -0800 Subject: [PATCH] media: Fix memory leak This fixes the following memory leak as a result of not freeing app->proxies: 160 (32 direct, 128 indirect) bytes in 1 blocks are definitely lost in loss record 218 of 261 at 0x484086F: malloc (vg_replace_malloc.c:381) by 0x1CF80E: btd_malloc (util.c:33) by 0x1CF24D: queue_new (queue.c:47) by 0x144DB9: create_app (media.c:2262) by 0x144DB9: register_app (media.c:2322) by 0x1CC148: process_message (object.c:246) Signed-off-by: Anuj Jain Signed-off-by: Ayush Garg --- profiles/audio/media.c | 1 + 1 file changed, 1 insertion(+) diff --git a/profiles/audio/media.c b/profiles/audio/media.c index 14d701d8..103dda8d 100644 --- a/profiles/audio/media.c +++ b/profiles/audio/media.c @@ -2330,6 +2330,7 @@ static void app_free(void *data) { struct media_app *app = data; + queue_destroy(app->proxies, NULL); queue_destroy(app->endpoints, media_endpoint_remove); queue_destroy(app->players, media_player_remove); -- 2.34.1