[TD-3031]<fix>: fix NULL parser crash

This commit is contained in:
Minglei Jin 2021-02-23 07:07:52 +08:00
parent 3d407ab587
commit 760b91094d
1 changed files with 3 additions and 1 deletions

View File

@ -154,7 +154,9 @@ void httpReleaseContext(HttpContext *pContext, bool clearRes) {
}
if (clearRes) {
httpClearParser(pContext->parser);
if (pContext->parser) {
httpClearParser(pContext->parser);
}
memset(&pContext->singleCmd, 0, sizeof(HttpSqlCmd));
}