Skip to content

Commit caaef7a

Browse files
committed
Move cleanup below raise
1 parent abc6672 commit caaef7a

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

Parser/tokenizer/helpers.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -467,8 +467,8 @@ _PyTokenizer_check_coding_spec(const char* line, Py_ssize_t size, struct tok_sta
467467
if (tok->encoding == NULL) {
468468
assert(tok->decoding_readline == NULL);
469469
if (strcmp(cs, "utf-8") != 0 && !set_readline(tok, cs)) {
470-
_PyTokenizer_error_ret(tok);
471470
_PyTokenizer_raise_init_error(tok->filename);
471+
_PyTokenizer_error_ret(tok);
472472
PyMem_Free(cs);
473473
return 0;
474474
}

0 commit comments

Comments
 (0)