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
This commit is contained in:
Neal Norwitz 2006-08-12 01:50:38 +00:00
parent 6bf1a8fe8b
commit e0a81afb10

View file

@ -1121,6 +1121,8 @@ fill_time(PyObject *v, int index, time_t sec, unsigned long nsec)
#else
ival = PyInt_FromLong((long)sec);
#endif
if (!ival)
return;
if (_stat_float_times) {
fval = PyFloat_FromDouble(sec + 1e-9*nsec);
} else {