Sfoglia il codice sorgente

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
(cherry picked from commit 00193f5e1f0e9e12b55c50d33eaf6f3d32e8bb92)
Daniel-Constantin Mierla 13 anni fa
parent
commit
b7787ed1ae
1 ha cambiato i file con 2 aggiunte e 0 eliminazioni
  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;
 	}