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

This commit is contained in:
chinaxing
2023-12-25 11:53:04 +00:00
committed by ob-robot
parent 679ec8a7ff
commit 41e4e3b46a

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 {
tx_ctx_->release_ctx_ref();
}
linked_ = false;
tx_ctx_->release_ctx_ref();
// _carefully_, DO NOT write code here
// Current obj has been free
}
}
return ret;
}