summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--NEWS1
-rw-r--r--psycopg/adapter_datetime.c2
2 files changed, 2 insertions, 1 deletions
diff --git a/NEWS b/NEWS
index 28a9ac2..ced7230 100644
--- a/NEWS
+++ b/NEWS
@@ -37,6 +37,7 @@ What's new in psycopg 2.6.2
- Fix build on Windows with Python 3.5, VS 2015 (:ticket:`#380`).
- Fixed `!errorcodes.lookup` initialization thread-safety (:ticket:`#382`).
- Fixed `!read()` exception propagation in copy_from (:ticket:`#412`).
+- Fixed possible NULL TZ decref (:ticket:`#424`).
What's new in psycopg 2.6.1
diff --git a/psycopg/adapter_datetime.c b/psycopg/adapter_datetime.c
index 0571837..9d04df4 100644
--- a/psycopg/adapter_datetime.c
+++ b/psycopg/adapter_datetime.c
@@ -451,7 +451,7 @@ psyco_TimestampFromTicks(PyObject *self, PyObject *args)
tz);
exit:
- Py_DECREF(tz);
+ Py_XDECREF(tz);
Py_XDECREF(m);
return res;
}