From a2be57eca8b81efad54b9dcab48c4717f15b6ebd Mon Sep 17 00:00:00 2001 From: Connor Lane Smith Date: Thu, 26 May 2011 16:24:56 -0100 Subject: [PATCH] tail: free rings --- tail.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tail.c b/tail.c index a53cbba..345fdc6 100644 --- a/tail.c +++ b/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);