Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/netbsd-1-4]: src/libexec/lfs_cleanerd Pull up revision 1.15 (requested b...



details:   https://anonhg.NetBSD.org/src/rev/e0e1b2c4512a
branches:  netbsd-1-4
changeset: 470211:e0e1b2c4512a
user:      he <he%NetBSD.org@localhost>
date:      Mon Jan 31 19:06:12 2000 +0000

description:
Pull up revision 1.15 (requested by perseant):
  Fix a few memory leaks in lfs_cleanerd.

diffstat:

 libexec/lfs_cleanerd/library.c |  7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)

diffs (35 lines):

diff -r 5c94cc4a25a3 -r e0e1b2c4512a libexec/lfs_cleanerd/library.c
--- a/libexec/lfs_cleanerd/library.c    Mon Jan 31 19:05:48 2000 +0000
+++ b/libexec/lfs_cleanerd/library.c    Mon Jan 31 19:06:12 2000 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: library.c,v 1.12.2.1 1999/10/11 05:18:29 cgd Exp $     */
+/*     $NetBSD: library.c,v 1.12.2.2 2000/01/31 19:06:12 he Exp $      */
 
 /*-
  * Copyright (c) 1992, 1993
@@ -38,7 +38,7 @@
 #if 0
 static char sccsid[] = "@(#)library.c  8.3 (Berkeley) 5/24/95";
 #else
-__RCSID("$NetBSD: library.c,v 1.12.2.1 1999/10/11 05:18:29 cgd Exp $");
+__RCSID("$NetBSD: library.c,v 1.12.2.2 2000/01/31 19:06:12 he Exp $");
 #endif
 #endif /* not lint */
 
@@ -244,7 +244,7 @@
 
        if (use_mmap && file_stat.st_size == fsp->fi_ifile_length) {
                /* (void) close(fid); */
-                free(ifile_name); /* XXX KS */
+                free(ifile_name);
                return;
        }
 
@@ -616,6 +616,7 @@
        }
        if (cksum ((void *)datap, nblocks * sizeof(u_long)) != ssp->ss_datasum) {
                 syslog(LOG_DEBUG, "Bad data checksum");
+               free(datap);
                return 0;
         }
 #endif



Home | Main Index | Thread Index | Old Index