File tree Expand file tree Collapse file tree 1 file changed +4
-0
lines changed
Expand file tree Collapse file tree 1 file changed +4
-0
lines changed Original file line number Diff line number Diff line change @@ -1229,6 +1229,7 @@ PyObject* parse_iso8601(PyObject *self, PyObject *args) {
12291229 PyErr_SetString (
12301230 PyExc_ValueError , "Invalid parameters"
12311231 );
1232+ free (parsed );
12321233 return NULL ;
12331234 }
12341235
@@ -1239,13 +1240,15 @@ PyObject* parse_iso8601(PyObject *self, PyObject *args) {
12391240 PyExc_ValueError , PARSER_ERRORS [parsed -> error ]
12401241 );
12411242
1243+ free (parsed );
12421244 return NULL ;
12431245 }
12441246 } else if (_parse_iso8601_datetime (str , parsed ) == NULL ) {
12451247 PyErr_SetString (
12461248 PyExc_ValueError , PARSER_ERRORS [parsed -> error ]
12471249 );
12481250
1251+ free (parsed );
12491252 return NULL ;
12501253 }
12511254
@@ -1295,6 +1298,7 @@ PyObject* parse_iso8601(PyObject *self, PyObject *args) {
12951298 parsed -> hours , parsed -> minutes , parsed -> seconds , parsed -> microseconds
12961299 );
12971300 } else {
1301+ free (parsed );
12981302 return NULL ;
12991303 }
13001304
You can’t perform that action at this time.
0 commit comments