tail: free rings
This commit is contained in:
parent
bf9626d408
commit
a2be57eca8
4
tail.c
4
tail.c
@ -69,8 +69,10 @@ taketail(FILE *fp, const char *str, long n)
|
||||
;
|
||||
|
||||
do {
|
||||
if(ring[j])
|
||||
if(ring[j]) {
|
||||
fputs(ring[j], stdout);
|
||||
free(ring[j]);
|
||||
}
|
||||
} while((j = (j+1)%n) != i);
|
||||
free(ring);
|
||||
free(size);
|
||||
|
Loading…
x
Reference in New Issue
Block a user