mirror of
https://github.com/python/cpython.git
synced 2025-07-29 06:05:00 +00:00
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:
parent
6bf1a8fe8b
commit
e0a81afb10
1 changed files with 2 additions and 0 deletions
|
@ -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 {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue