Skip to content

Commit

Permalink
Fix one more leak
Browse files Browse the repository at this point in the history
  • Loading branch information
Twixes committed Oct 16, 2023
1 parent a2db4da commit 03bf375
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions hogql_parser/parser.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -431,8 +431,10 @@ class HogQLParseTreeConverter : public HogQLParserBaseVisitor {
PyObject* next_join = PyObject_GetAttrString(last_join, "next_join");
while (!Py_IsNone(next_join)) {
last_join = next_join;
Py_DECREF(next_join);
next_join = PyObject_GetAttrString(last_join, "next_join");
}
Py_DECREF(next_join);
PyObject_SetAttrString(last_join, "next_join", join2);
Py_DECREF(join2);

Expand Down Expand Up @@ -465,8 +467,10 @@ class HogQLParseTreeConverter : public HogQLParserBaseVisitor {
PyObject* next_join = PyObject_GetAttrString(last_join, "next_join");
while (!Py_IsNone(next_join)) {
last_join = next_join;
Py_DECREF(next_join);
next_join = PyObject_GetAttrString(last_join, "next_join");
}
Py_DECREF(next_join);
PyObject_SetAttrString(last_join, "next_join", join2);
Py_DECREF(join2);

Expand Down

0 comments on commit 03bf375

Please sign in to comment.