Don't forget to notify clients when a control is removed

This commit is contained in:
Alexandre Ratchov 2020-04-15 14:24:59 +02:00
parent 3b8a8de5f2
commit 573c328527
1 changed files with 5 additions and 3 deletions

View File

@ -2365,10 +2365,12 @@ dev_rmctl(struct dev *d, int addr)
} }
#endif #endif
c->refs_mask &= ~CTL_DEVMASK; c->refs_mask &= ~CTL_DEVMASK;
if (c->refs_mask != 0) if (c->refs_mask == 0) {
*pc = c->next;
xfree(c);
return; return;
*pc = c->next; }
xfree(c); c->desc_mask = ~0;
} }
void void