mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-10-29 05:40:27 -04:00
client-node: close SyncObj fd as well
We also need to close the SynObj fd we got, just like we close any DmaBuf or MemFd. Make sure we get a compiler error when we add more items to the data type enumeration later. Fixes #4807
This commit is contained in:
parent
74ad61f094
commit
c3ec30dec7
1 changed files with 6 additions and 3 deletions
|
|
@ -242,7 +242,11 @@ fail:
|
|||
|
||||
static void clear_data(struct impl *impl, struct spa_data *d)
|
||||
{
|
||||
switch (d->type) {
|
||||
switch ((enum spa_data_type)d->type) {
|
||||
case SPA_DATA_Invalid:
|
||||
case SPA_DATA_MemPtr:
|
||||
case _SPA_DATA_LAST:
|
||||
break;
|
||||
case SPA_DATA_MemId:
|
||||
{
|
||||
uint32_t id;
|
||||
|
|
@ -258,11 +262,10 @@ static void clear_data(struct impl *impl, struct spa_data *d)
|
|||
}
|
||||
case SPA_DATA_MemFd:
|
||||
case SPA_DATA_DmaBuf:
|
||||
case SPA_DATA_SyncObj:
|
||||
pw_log_debug("%p: close fd:%d", impl, (int)d->fd);
|
||||
close(d->fd);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue