Skip to content

Commit

Permalink
Merge pull request #184 from flaviojs/fix-data-race-vtty_delete
Browse files Browse the repository at this point in the history
Fix data race in vtty_delete.
  • Loading branch information
grossmj authored Mar 24, 2024
2 parents edd9951 + bf37219 commit d671df2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions common/dev_vtty.c
Original file line number Diff line number Diff line change
Expand Up @@ -569,13 +569,13 @@ void vtty_delete(vtty_t *vtty)
int i;

if (vtty != NULL) {
VTTY_LIST_LOCK();
if (vtty->pprev != NULL) {
VTTY_LIST_LOCK();
if (vtty->next)
vtty->next->pprev = vtty->pprev;
*(vtty->pprev) = vtty->next;
VTTY_LIST_UNLOCK();
}
VTTY_LIST_UNLOCK();

switch(vtty->type) {
case VTTY_TYPE_TCP:
Expand Down

0 comments on commit d671df2

Please sign in to comment.