Skip to content

Commit

Permalink
fix(SQLParser): typo that leads to the use of freed memory
Browse files Browse the repository at this point in the history
  • Loading branch information
peter15914 authored and matejk committed Jan 5, 2025
1 parent c9dc1f9 commit 79888c0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Data/SQLParser/src/SQLParserResult.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 79888c0

Please sign in to comment.