Skip to content

Commit

Permalink
tsilo: Fix transaction removal to update list head
Browse files Browse the repository at this point in the history
- When transaction being removed is the head of the list,
  correctly update the head to point to the next transaction.

(cherry picked from commit 6ce6803)
  • Loading branch information
doublec authored and grumvalski committed Sep 1, 2015
1 parent 4c24d4a commit 4d1b658
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions modules/tsilo/ts_hash.c
Expand Up @@ -396,8 +396,8 @@ void remove_ts_transaction(ts_transaction_t* ts_t)
if (ts_t->prev)
ts_t->prev->next = ts_t->next;

if ((ts_t->prev == NULL) && (ts_t->next == NULL))
ts_t->urecord->transactions = NULL;
if (ts_t->urecord->transactions == ts_t)
ts_t->urecord->transactions = ts_t->next;

free_ts_transaction((void*)ts_t);

Expand Down

0 comments on commit 4d1b658

Please sign in to comment.