Skip to content

Commit 72f562f

Browse files
committed
Fix potential NULL pointer dereferencing in ast module
CID 719690
1 parent a92fbe6 commit 72f562f

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

Python/ast.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -535,11 +535,11 @@ init_normalization(struct compiling *c)
535535
if (!c->c_normalize)
536536
return 0;
537537
c->c_normalize_args = Py_BuildValue("(sN)", "NFKC", Py_None);
538-
PyTuple_SET_ITEM(c->c_normalize_args, 1, NULL);
539538
if (!c->c_normalize_args) {
540539
Py_CLEAR(c->c_normalize);
541540
return 0;
542541
}
542+
PyTuple_SET_ITEM(c->c_normalize_args, 1, NULL);
543543
return 1;
544544
}
545545

0 commit comments

Comments
 (0)