fix(SQLParser): typo that leads to the use of freed memory

This commit is contained in:
peter15914 2025-01-03 04:31:08 +05:00 committed by Matej Kenda
parent c9dc1f9d3c
commit 79888c0e06

View File

@ -67,7 +67,7 @@ int SQLParserResult::errorColumn() const { return errorColumn_; }
void SQLParserResult::setIsValid(bool isValid) { isValid_ = isValid; }
void SQLParserResult::setErrorDetails(char* errorMsg, int errorLine, int errorColumn) {
if (errorMsg_) free(errorMsg);
if (errorMsg_) free(errorMsg_);
errorMsg_ = errorMsg;
errorLine_ = errorLine;
errorColumn_ = errorColumn;