fix udfd crash

This commit is contained in:
yihaoDeng 2022-12-09 11:29:04 +08:00
parent bf48419dff
commit 0b1cef9b51
2 changed files with 4 additions and 0 deletions

View File

@ -285,6 +285,7 @@ static void cliReleaseUnfinishedMsg(SCliConn* conn) {
} }
destroyCmsg(msg); destroyCmsg(msg);
} }
memset(conn->ctx, 0, sizeof(conn->ctx));
} }
bool cliMaySendCachedMsg(SCliConn* conn) { bool cliMaySendCachedMsg(SCliConn* conn) {
if (!transQueueEmpty(&conn->cliMsgs)) { if (!transQueueEmpty(&conn->cliMsgs)) {

View File

@ -282,6 +282,9 @@ void transCtxCleanup(STransCtx* ctx) {
} }
void transCtxMerge(STransCtx* dst, STransCtx* src) { void transCtxMerge(STransCtx* dst, STransCtx* src) {
if (src->args == NULL || src->freeFunc == NULL) {
return;
}
if (dst->args == NULL) { if (dst->args == NULL) {
dst->args = src->args; dst->args = src->args;
dst->brokenVal = src->brokenVal; dst->brokenVal = src->brokenVal;