tail: free rings

This commit is contained in:
Connor Lane Smith 2011-05-26 16:24:56 -01:00
parent bf9626d408
commit a2be57eca8

4
tail.c
View File

@ -69,8 +69,10 @@ taketail(FILE *fp, const char *str, long n)
; ;
do { do {
if(ring[j]) if(ring[j]) {
fputs(ring[j], stdout); fputs(ring[j], stdout);
free(ring[j]);
}
} while((j = (j+1)%n) != i); } while((j = (j+1)%n) != i);
free(ring); free(ring);
free(size); free(size);