From 6ce6803d57dabe287d7d6fa859e93c1df402d821 Mon Sep 17 00:00:00 2001 From: Chris Double Date: Tue, 1 Sep 2015 00:17:40 +1200 Subject: [PATCH] tsilo: Fix transaction removal to update list head - When transaction being removed is the head of the list, correctly update the head to point to the next transaction. --- modules/tsilo/ts_hash.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/tsilo/ts_hash.c b/modules/tsilo/ts_hash.c index cf529eeb707..7986991f386 100644 --- a/modules/tsilo/ts_hash.c +++ b/modules/tsilo/ts_hash.c @@ -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);