@@ -822,22 +822,15 @@ do_include_common (cpp_reader *pfile, enum include_type type)
822
822
823
823
fname = parse_include (pfile , & angle_brackets , & buf , & location );
824
824
if (!fname )
825
- {
826
- if (buf )
827
- XDELETEVEC (buf );
828
- return ;
829
- }
825
+ goto done ;
830
826
831
827
if (!* fname )
832
- {
833
- cpp_error_with_line (pfile , CPP_DL_ERROR , location , 0 ,
834
- "empty filename in #%s" ,
835
- pfile -> directive -> name );
836
- XDELETEVEC (fname );
837
- if (buf )
838
- XDELETEVEC (buf );
839
- return ;
840
- }
828
+ {
829
+ cpp_error_with_line (pfile , CPP_DL_ERROR , location , 0 ,
830
+ "empty filename in #%s" ,
831
+ pfile -> directive -> name );
832
+ goto done ;
833
+ }
841
834
842
835
/* Prevent #include recursion. */
843
836
if (pfile -> line_table -> depth >= CPP_STACK_MAX )
@@ -855,6 +848,7 @@ do_include_common (cpp_reader *pfile, enum include_type type)
855
848
_cpp_stack_include (pfile , fname , angle_brackets , type , location );
856
849
}
857
850
851
+ done :
858
852
XDELETEVEC (fname );
859
853
if (buf )
860
854
XDELETEVEC (buf );
@@ -2613,6 +2607,8 @@ _cpp_pop_buffer (cpp_reader *pfile)
2613
2607
2614
2608
_cpp_do_file_change (pfile , LC_LEAVE , 0 , 0 , 0 );
2615
2609
}
2610
+ else if (to_free )
2611
+ free ((void * )to_free );
2616
2612
}
2617
2613
2618
2614
/* Enter all recognized directives in the hash table. */
0 commit comments