Skip to content

Commit 449e7a9

Browse files
committed
Fix refleak in error path of time_tzset
1 parent 671a953 commit 449e7a9

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

Modules/timemodule.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1170,6 +1170,7 @@ time_tzset(PyObject *self, PyObject *unused)
11701170

11711171
/* Reset timezone, altzone, daylight and tzname */
11721172
if (init_timezone(m) < 0) {
1173+
Py_DECREF(m);
11731174
return NULL;
11741175
}
11751176
Py_DECREF(m);

0 commit comments

Comments
 (0)