Skip to content

Commit c2ae6e3

Browse files
Apply suggestions from code review
1 parent bd71f6e commit c2ae6e3

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

Python/compile.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2546,9 +2546,11 @@ compiler_class_body(struct compiler *c, stmt_ty s, int firstlineno)
25462546
assert(c->u->u_static_attributes);
25472547
PyObject *static_attributes_unsorted = PySequence_List(c->u->u_static_attributes);
25482548
if (static_attributes_unsorted == NULL) {
2549+
compiler_exit_scope(c);
25492550
return ERROR;
25502551
}
25512552
if (PyList_Sort(static_attributes_unsorted) != 0) {
2553+
compiler_exit_scope(c);
25522554
Py_DECREF(static_attributes_unsorted);
25532555
return ERROR;
25542556
}

0 commit comments

Comments
 (0)