From 7fbb9b02f47a159786b43d30d4f6901a742aafa6 Mon Sep 17 00:00:00 2001 From: Stelian Pop Date: Sun, 5 Dec 1999 18:21:21 +0000 Subject: [PATCH] Fixed a memory leak in traverse.c (dump growed very big when dumping a big filesystem). --- CHANGES | 6 +++++- THANKS | 3 ++- dump/traverse.c | 3 ++- 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/CHANGES b/CHANGES index 662c5bb..73ba57a 100644 --- a/CHANGES +++ b/CHANGES @@ -1,4 +1,4 @@ -$Id: CHANGES,v 1.22 1999/11/22 21:39:37 tiniou Exp $ +$Id: CHANGES,v 1.23 1999/12/05 18:21:21 tiniou Exp $ Changes between versions 0.4b10 and 0.4b11 (released ????????????????) ====================================================================== @@ -18,6 +18,10 @@ Changes between versions 0.4b10 and 0.4b11 (released ????????????????) the 'M' flag, restore automatically selects the right file without asking to enter a new tape each time. +4. Fixed a memory leak which was causing dump to grow very big + (270MB when dumping a 10GB filesystem...). Thanks to Zaphod + Beeblebrox for reporting the bug. + Changes between versions 0.4b9 and 0.4b10 (released November 21, 1999) ====================================================================== diff --git a/THANKS b/THANKS index 87d85e2..c5ad146 100644 --- a/THANKS +++ b/THANKS @@ -1,4 +1,4 @@ -$Id: THANKS,v 1.11 1999/11/22 19:08:47 tiniou Exp $ +$Id: THANKS,v 1.12 1999/12/05 18:21:21 tiniou Exp $ Dump and restore were written by the people of the CSRG at the University of California, Berkeley. @@ -22,6 +22,7 @@ Thanks to people who reported problems with the port, sent patches, and suggested various improvements. Here is a partial list of them (if I have forgotten someone, please complain): +Zaphod Beeblebrox zaphod@netrider.org.au Stephen Carr sgcarr@civeng.adelaide.edu.au Rob Cermak cermak@ahab.rutgers.edu Abhijit Dasgupta abhijit@ans.net diff --git a/dump/traverse.c b/dump/traverse.c index 7d6a38f..a95a21e 100644 --- a/dump/traverse.c +++ b/dump/traverse.c @@ -40,7 +40,7 @@ #ifndef lint static const char rcsid[] = - "$Id: traverse.c,v 1.10 1999/11/21 02:24:47 tiniou Exp $"; + "$Id: traverse.c,v 1.11 1999/12/05 18:21:23 tiniou Exp $"; #endif /* not lint */ #include @@ -759,6 +759,7 @@ dumpino(struct dinode *dp, ino_t ino) if (bc.cnt > 0) { blksout (bc.buf, bc.cnt, bc.ino); } + free(bc.buf); #else for (ind_level = 0; ind_level < NIADDR; ind_level++) { dmpindir(ino, dp->di_ib[ind_level], ind_level, &size); -- 2.39.2