forked from huawei/openGauss-server
fix security issue
Offering: openGaussDev More detail: fix try-catch of check_engine_status Match-id-9560a5be8caa621a4d5bf1eb6e24403e5a2aacfa
This commit is contained in:
parent
3900f93081
commit
38b7213f8e
|
@ -409,6 +409,7 @@ bool TryConnectRemoteServer(AiEngineConnInfo* conninfo, char** buf)
|
|||
if (!CheckConnParams(conninfo)) {
|
||||
return false;
|
||||
}
|
||||
bool exceptionCaught = false;
|
||||
|
||||
PG_TRY();
|
||||
{
|
||||
|
@ -444,14 +445,19 @@ bool TryConnectRemoteServer(AiEngineConnInfo* conninfo, char** buf)
|
|||
}
|
||||
PG_CATCH();
|
||||
{
|
||||
exceptionCaught = true;
|
||||
t_thrd.int_cxt.ImmediateInterruptOK = immediateInterruptOKOld;
|
||||
DestoryAiHandle(connHandle);
|
||||
if (buf != NULL) {
|
||||
*buf = NULL;
|
||||
}
|
||||
return false;
|
||||
FlushErrorState();
|
||||
}
|
||||
PG_END_TRY();
|
||||
if (exceptionCaught) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (buf != NULL) {
|
||||
*buf = pstrdup(connHandle->rec_buf);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue