Commit 49884536 authored by Alexey Izbyshev's avatar Alexey Izbyshev Committed by Benjamin Peterson

closes bpo-34471: _datetime: Add missing NULL check to tzinfo_from_isoformat_results. (GH-8869)

Reported by Svace static analyzer.
parent 91cb298f
......@@ -1290,8 +1290,11 @@ tzinfo_from_isoformat_results(int rv, int tzoffset, int tz_useconds) {
}
PyObject *delta = new_delta(0, tzoffset, tz_useconds, 1);
if (delta == NULL) {
return NULL;
}
tzinfo = new_timezone(delta, NULL);
Py_XDECREF(delta);
Py_DECREF(delta);
} else {
tzinfo = Py_None;
Py_INCREF(Py_None);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment