pipewire: module-zeroconf-discover: free correct pointer

Retrieve the pointer returned by `calloc()` and free that
instead of freeing the pointer to a member. This has worked
so far because as of yet `api` is the first member of the struct.
This commit is contained in:
Barnabás Pőcze 2021-06-16 19:20:24 +02:00 committed by Wim Taymans
parent 58e254ec63
commit bbbf5724be

View file

@ -187,5 +187,7 @@ AvahiPoll* pw_avahi_poll_new(struct pw_loop *loop)
void pw_avahi_poll_free(AvahiPoll *p)
{
free(p);
struct impl *impl = SPA_CONTAINER_OF(p, struct impl, api);
free(impl);
}