zeroconf-discover: fix a memory leak

Coverity CID: #1358700

https://bugs.freedesktop.org/show_bug.cgi?id=97876
This commit is contained in:
Philip Withnall 2016-09-20 10:26:00 -07:00 committed by Tanu Kaskinen
parent feecced5cd
commit 768e57c8a0

View file

@ -173,9 +173,10 @@ static void resolver_cb(
ss.channels = (uint8_t) atoi(value); ss.channels = (uint8_t) atoi(value);
else if (pa_streq(key, "format")) else if (pa_streq(key, "format"))
ss.format = pa_parse_sample_format(value); 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); 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); pa_channel_map_parse(&cm, value);
channel_map_set = true; channel_map_set = true;
} }