mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-10-29 05:40:27 -04:00
audioadapter: clear the handle as well to avoid leaks
This commit is contained in:
parent
ffed9763fd
commit
5c2b5fa552
1 changed files with 6 additions and 2 deletions
|
|
@ -1801,8 +1801,10 @@ static int load_converter(struct impl *this, const struct spa_dict *info,
|
|||
if (iface_conv == NULL) {
|
||||
if (unload_handle)
|
||||
spa_plugin_loader_unload(this->ploader, hnd_convert);
|
||||
else
|
||||
else {
|
||||
spa_handle_clear(hnd_convert);
|
||||
free(hnd_convert);
|
||||
}
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
|
|
@ -1938,8 +1940,10 @@ static int impl_clear(struct spa_handle *handle)
|
|||
if (this->hnd_convert) {
|
||||
if (this->unload_handle)
|
||||
spa_plugin_loader_unload(this->ploader, this->hnd_convert);
|
||||
else
|
||||
else {
|
||||
spa_handle_clear(this->hnd_convert);
|
||||
free(this->hnd_convert);
|
||||
}
|
||||
free(this->convertname);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue