summaryrefslogtreecommitdiff
path: root/src/runtime/python
diff options
context:
space:
mode:
Diffstat (limited to 'src/runtime/python')
-rw-r--r--src/runtime/python/pypgf.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/runtime/python/pypgf.c b/src/runtime/python/pypgf.c
index 5adf91c10..6a798134a 100644
--- a/src/runtime/python/pypgf.c
+++ b/src/runtime/python/pypgf.c
@@ -1206,9 +1206,6 @@ Concr_parse(ConcrObject* self, PyObject *args, PyObject *keywds)
heuristics, pyres->pool, out_pool);
if (pyres->res == NULL) {
- Py_DECREF(pyres);
- pyres = NULL;
-
PgfToken tok =
pgf_lexer_current_token(lexer);
@@ -1221,6 +1218,9 @@ Concr_parse(ConcrObject* self, PyObject *args, PyObject *keywds)
PyString_AsString(py_tok));
Py_DECREF(py_tok);
}
+
+ Py_DECREF(pyres);
+ pyres = NULL;
}
Py_XDECREF(py_lexer);