From 5fdde3fa83d168e1c44497be2754fc1b6fc20d4e Mon Sep 17 00:00:00 2001 From: Daniil Kovalev Date: Sat, 2 Nov 2019 21:43:51 +0300 Subject: [PATCH] Fix memory leak in context_free In commit f727cd9a `int error` member in `struct pa_context` was changed to `pa_context_error *error`. The memory that is allocated with `pa_xnew0` in src/pulse/context.c:142 is never freed, and it causes a leak of 4 bytes. The leak can be easily detected with leak-sanitizer. --- src/pulse/context.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/pulse/context.c b/src/pulse/context.c index 180e6875c..1d1bb9ee8 100644 --- a/src/pulse/context.c +++ b/src/pulse/context.c @@ -274,6 +274,7 @@ static void context_free(pa_context *c) { pa_proplist_free(c->proplist); pa_xfree(c->server); + pa_xfree(c->error); pa_xfree(c); } -- 2.34.1