File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed
Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -266,7 +266,7 @@ static void show_stats(struct diffstat_t* data)
266266 char * qname = xmalloc (len + 1 );
267267 quote_c_style (name , qname , NULL , 0 );
268268 free (name );
269- name = qname ;
269+ data -> files [ i ] -> name = name = qname ;
270270 }
271271
272272 /*
@@ -297,10 +297,10 @@ static void show_stats(struct diffstat_t* data)
297297 if (added < 0 ) {
298298 /* binary file */
299299 printf (" %s%-*s | Bin\n" , prefix , len , name );
300- continue ;
300+ goto free_diffstat_file ;
301301 } else if (added + deleted == 0 ) {
302302 total_files -- ;
303- continue ;
303+ goto free_diffstat_file ;
304304 }
305305
306306 add = added ;
@@ -314,11 +314,11 @@ static void show_stats(struct diffstat_t* data)
314314 add = (add * max + max_change / 2 ) / max_change ;
315315 del = total - add ;
316316 }
317- /* TODO: binary */
318317 printf (" %s%-*s |%5d %.*s%.*s\n" , prefix ,
319318 len , name , added + deleted ,
320319 add , pluses , del , minuses );
321- free (name );
320+ free_diffstat_file :
321+ free (data -> files [i ]-> name );
322322 free (data -> files [i ]);
323323 }
324324 free (data -> files );
You can’t perform that action at this time.
0 commit comments