@@ -694,8 +694,9 @@ _elementtree_Element_append_impl(ElementObject *self, PyObject *subelement)
694
694
/*[clinic end generated code: output=54a884b7cf2295f4 input=439f2bd777288fb6]*/
695
695
{
696
696
elementtreestate * st = ET_STATE_GLOBAL ;
697
- if (element_add_subelement (st , self , subelement ) < 0 )
697
+ if (element_add_subelement (st , self , subelement ) < 0 ) {
698
698
return NULL ;
699
+ }
699
700
700
701
Py_RETURN_NONE ;
701
702
}
@@ -2641,8 +2642,9 @@ treebuilder_handle_start(elementtreestate *st, TreeBuilderObject *self,
2641
2642
Py_CLEAR (self -> last_for_tail );
2642
2643
2643
2644
if (this != Py_None ) {
2644
- if (treebuilder_add_subelement (st , this , node ) < 0 )
2645
+ if (treebuilder_add_subelement (st , this , node ) < 0 ) {
2645
2646
goto error ;
2647
+ }
2646
2648
} else {
2647
2649
if (self -> root ) {
2648
2650
PyErr_SetString (
@@ -2763,8 +2765,9 @@ treebuilder_handle_comment(elementtreestate *st, TreeBuilderObject *self,
2763
2765
2764
2766
this = self -> this ;
2765
2767
if (self -> insert_comments && this != Py_None ) {
2766
- if (treebuilder_add_subelement (st , this , comment ) < 0 )
2768
+ if (treebuilder_add_subelement (st , this , comment ) < 0 ) {
2767
2769
goto error ;
2770
+ }
2768
2771
Py_XSETREF (self -> last_for_tail , Py_NewRef (comment ));
2769
2772
}
2770
2773
} else {
@@ -2803,8 +2806,9 @@ treebuilder_handle_pi(elementtreestate *st, TreeBuilderObject *self,
2803
2806
2804
2807
this = self -> this ;
2805
2808
if (self -> insert_pis && this != Py_None ) {
2806
- if (treebuilder_add_subelement (st , this , pi ) < 0 )
2809
+ if (treebuilder_add_subelement (st , this , pi ) < 0 ) {
2807
2810
goto error ;
2811
+ }
2808
2812
Py_XSETREF (self -> last_for_tail , Py_NewRef (pi ));
2809
2813
}
2810
2814
} else {
0 commit comments