From 79888c0e06575ad5ed3290d3ccac3f84d9f716ac Mon Sep 17 00:00:00 2001 From: peter15914 <48548636+peter15914@users.noreply.github.com> Date: Fri, 3 Jan 2025 04:31:08 +0500 Subject: [PATCH] fix(SQLParser): typo that leads to the use of freed memory --- Data/SQLParser/src/SQLParserResult.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Data/SQLParser/src/SQLParserResult.cpp b/Data/SQLParser/src/SQLParserResult.cpp index c5dad9839..2d5212f62 100644 --- a/Data/SQLParser/src/SQLParserResult.cpp +++ b/Data/SQLParser/src/SQLParserResult.cpp @@ -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;