summaryrefslogtreecommitdiffhomepage
path: root/src/python/nxt_python.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/python/nxt_python.c')
-rw-r--r--src/python/nxt_python.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/python/nxt_python.c b/src/python/nxt_python.c
index 7bbf3d49..143d8d5d 100644
--- a/src/python/nxt_python.c
+++ b/src/python/nxt_python.c
@@ -462,6 +462,7 @@ nxt_python_set_target(nxt_task_t *task, nxt_python_target_t *target,
"factory \"%s\" in module \"%s\" "
"can not be called to fetch callable",
callable, module_name);
+ Py_INCREF(obj); /* borrowed reference */
goto fail;
}