summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniele Varrazzo <daniele.varrazzo@gmail.com>2016-07-01 19:28:02 +0100
committerDaniele Varrazzo <daniele.varrazzo@gmail.com>2016-07-01 19:28:02 +0100
commite41bff8ca4785c4fe81829eedee169e5a95fbcf8 (patch)
treeb6c271766b81b1b59f0a0f03a9482ec1dd1a89f8
parent5bcaf11f9db43f15d52943916647a0cc0dc6ffca (diff)
parent80fd14463be54c13600b27e7fd4a9228a3500712 (diff)
downloadpsycopg2-e41bff8ca4785c4fe81829eedee169e5a95fbcf8.tar.gz
Merge branch 'bug-424'
-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;
}