[master] fix use-after-free in ObTxCommitCallback::callback

This commit is contained in:
chinaxing
2024-02-08 10:19:59 +00:00
committed by ob-robot
parent a3fdceb07b
commit 1fd0e862c1

View File

@ -77,9 +77,11 @@ int ObTxCommitCallback::callback()
ret = OB_ERR_UNEXPECTED;
TRANS_LOG(ERROR, "tx ctx should not be null for linked commit cb", K(ret), KPC(this));
} else {
linked_ = false;
tx_ctx_->release_ctx_ref();
// _carefully_, DO NOT write code here
// Current obj has been free
}
linked_ = false;
}
return ret;
}