File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -210,26 +210,29 @@ static int is_tag_in_date_range(struct object *tag, struct rev_info *revs)
210210{
211211 unsigned long size ;
212212 enum object_type type ;
213- char * buf , * line , * lineend ;
213+ char * buf = NULL , * line , * lineend ;
214214 unsigned long date ;
215+ int result = 1 ;
215216
216217 if (revs -> max_age == -1 && revs -> min_age == -1 )
217- return 1 ;
218+ goto out ;
218219
219220 buf = read_sha1_file (tag -> sha1 , & type , & size );
220221 if (!buf )
221- return 1 ;
222+ goto out ;
222223 line = memmem (buf , size , "\ntagger " , 8 );
223224 if (!line ++ )
224- return 1 ;
225+ goto out ;
225226 lineend = memchr (line , '\n' , buf + size - line );
226227 line = memchr (line , '>' , lineend ? lineend - line : buf + size - line );
227228 if (!line ++ )
228- return 1 ;
229+ goto out ;
229230 date = strtoul (line , NULL , 10 );
230- free (buf );
231- return (revs -> max_age == -1 || revs -> max_age < date ) &&
231+ result = (revs -> max_age == -1 || revs -> max_age < date ) &&
232232 (revs -> min_age == -1 || revs -> min_age > date );
233+ out :
234+ free (buf );
235+ return result ;
233236}
234237
235238int create_bundle (struct bundle_header * header , const char * path ,
You can’t perform that action at this time.
0 commit comments