example: fix invalid free() operation in bluez-session

obj->handle should not be directly freed; instead, it should be
freed using "pw_unload_spa_handle", otherwise there will be
segmentation fault.
This commit is contained in:
t123yh 2023-10-21 15:42:23 -07:00 committed by Wim Taymans
parent 8848923d82
commit 7fa64a8b71

View file

@ -267,7 +267,7 @@ static void remove_object(struct impl *impl, struct object *obj)
spa_list_remove(&obj->link);
spa_hook_remove(&obj->listener);
pw_proxy_destroy(obj->proxy);
free(obj->handle);
pw_unload_spa_handle(obj->handle);
free(obj);
}