[master] fix use-after-free in ObTxCommitCallback::callback
This commit is contained in:
@ -77,9 +77,11 @@ int ObTxCommitCallback::callback()
|
|||||||
ret = OB_ERR_UNEXPECTED;
|
ret = OB_ERR_UNEXPECTED;
|
||||||
TRANS_LOG(ERROR, "tx ctx should not be null for linked commit cb", K(ret), KPC(this));
|
TRANS_LOG(ERROR, "tx ctx should not be null for linked commit cb", K(ret), KPC(this));
|
||||||
} else {
|
} else {
|
||||||
tx_ctx_->release_ctx_ref();
|
|
||||||
}
|
|
||||||
linked_ = false;
|
linked_ = false;
|
||||||
|
tx_ctx_->release_ctx_ref();
|
||||||
|
// _carefully_, DO NOT write code here
|
||||||
|
// Current obj has been free
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user