raop: Fix potential memory leak

Coverity ID: #1410204

Signed-off-by: Peter Meerwald-Stadler <pmeerw@pmeerw.net>
This commit is contained in:
Peter Meerwald-Stadler 2017-02-27 23:23:04 +01:00
parent 4d7922d091
commit 94fc8c9ee2

View file

@ -152,7 +152,7 @@ static void resolver_cb(
if (event != AVAHI_RESOLVER_FOUND) { if (event != AVAHI_RESOLVER_FOUND) {
pa_log("Resolving of '%s' failed: %s", name, avahi_strerror(avahi_client_errno(u->client))); pa_log("Resolving of '%s' failed: %s", name, avahi_strerror(avahi_client_errno(u->client)));
goto finish; goto finish;
} }
if ((nicename = strstr(name, "@"))) { if ((nicename = strstr(name, "@"))) {
@ -235,6 +235,12 @@ static void resolver_cb(
pa_log("Cannot construct valid device name from '%s'.", dname); pa_log("Cannot construct valid device name from '%s'.", dname);
avahi_free(device); avahi_free(device);
pa_xfree(dname); pa_xfree(dname);
pa_xfree(tp);
pa_xfree(et);
pa_xfree(cn);
pa_xfree(ch);
pa_xfree(ss);
pa_xfree(sr);
goto finish; goto finish;
} }