From 14dab48aa8650ef69f90f51e9ba1a77f63e15d99 Mon Sep 17 00:00:00 2001 From: Philip Withnall Date: Tue, 20 Sep 2016 10:26:00 -0700 Subject: [PATCH] zeroconf: Fix a memory leak in discovery Coverity CID: #1358700 https://bugs.freedesktop.org/show_bug.cgi?id=97876 --- src/modules/module-zeroconf-discover.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/modules/module-zeroconf-discover.c b/src/modules/module-zeroconf-discover.c index bd7e6ab..96476b7 100644 --- a/src/modules/module-zeroconf-discover.c +++ b/src/modules/module-zeroconf-discover.c @@ -173,9 +173,10 @@ static void resolver_cb( ss.channels = (uint8_t) atoi(value); else if (pa_streq(key, "format")) ss.format = pa_parse_sample_format(value); - else if (pa_streq(key, "icon-name")) + else if (pa_streq(key, "icon-name")) { + pa_xfree(properties); properties = pa_sprintf_malloc("device.icon_name=%s", value); - else if (pa_streq(key, "channel_map")) { + } else if (pa_streq(key, "channel_map")) { pa_channel_map_parse(&cm, value); channel_map_set = true; } -- 2.7.4