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 @@ -1230,6 +1230,7 @@ PyObject* parse_iso8601(PyObject *self, PyObject *args) {
12301230 PyErr_SetString (
12311231 PyExc_ValueError , "Invalid parameters"
12321232 );
1233+ free (parsed );
12331234 return NULL ;
12341235 }
12351236
@@ -1240,13 +1241,15 @@ PyObject* parse_iso8601(PyObject *self, PyObject *args) {
12401241 PyExc_ValueError , PARSER_ERRORS [parsed -> error ]
12411242 );
12421243
1244+ free (parsed );
12431245 return NULL ;
12441246 }
12451247 } else if (_parse_iso8601_datetime (str , parsed ) == NULL ) {
12461248 PyErr_SetString (
12471249 PyExc_ValueError , PARSER_ERRORS [parsed -> error ]
12481250 );
12491251
1252+ free (parsed );
12501253 return NULL ;
12511254 }
12521255
@@ -1296,6 +1299,7 @@ PyObject* parse_iso8601(PyObject *self, PyObject *args) {
12961299 parsed -> hours , parsed -> minutes , parsed -> seconds , parsed -> microseconds
12971300 );
12981301 } else {
1302+ free (parsed );
12991303 return NULL ;
13001304 }
13011305
You can’t perform that action at this time.
0 commit comments