Pārlūkot izejas kodu

tm: reset T if t_continue() resumes a canceled transaction

- when the suspended transaction was already canceled, and t_continue
  was executed before transaction was destroyed, global variable T was
  left set, causing an extra unref by post script callback
Daniel-Constantin Mierla 13 gadi atpakaļ
vecāks
revīzija
00193f5e1f
1 mainītis faili ar 2 papildinājumiem un 0 dzēšanām
  1. 2 0
      modules/tm/t_suspend.c

+ 2 - 0
modules/tm/t_suspend.c

@@ -133,6 +133,8 @@ int t_continue(unsigned int hash_index, unsigned int label,
 		/* The transaction has already been canceled,
 		 * needless to continue */
 		UNREF(t); /* t_unref would kill the transaction */
+		/* reset T as we have no working T anymore */
+		set_t(T_UNDEFINED, T_BR_UNDEFINED);
 		return 1;
 	}