Commit e0a81afb authored by Neal Norwitz's avatar Neal Norwitz

If _stat_float_times is false, we will try to INCREF ival which could be NULL.

Return early in that case.  The caller checks for PyErr_Occurred so this
should be ok.

Klocwork #297
parent 6bf1a8fe
...@@ -1121,6 +1121,8 @@ fill_time(PyObject *v, int index, time_t sec, unsigned long nsec) ...@@ -1121,6 +1121,8 @@ fill_time(PyObject *v, int index, time_t sec, unsigned long nsec)
#else #else
ival = PyInt_FromLong((long)sec); ival = PyInt_FromLong((long)sec);
#endif #endif
if (!ival)
return;
if (_stat_float_times) { if (_stat_float_times) {
fval = PyFloat_FromDouble(sec + 1e-9*nsec); fval = PyFloat_FromDouble(sec + 1e-9*nsec);
} else { } else {
......
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