Source-Changes-HG archive

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

[src/netbsd-1-6]: src/distrib/utils/sysinst Pull up revision 1.72 (requested ...



details:   https://anonhg.NetBSD.org/src/rev/68878b23d9ee
branches:  netbsd-1-6
changeset: 528300:68878b23d9ee
user:      lukem <lukem%NetBSD.org@localhost>
date:      Sat Jun 29 23:26:02 2002 +0000

description:
Pull up revision 1.72 (requested by scottr in ticket #405):
A malloc() return value wasn't checked properly in cleanup_dist() while
reading the file list. Bob Nestor found this by inspection while working on
sysinst for NetBSD/mac68k, and as such there is no corresponding PR.

diffstat:

 distrib/utils/sysinst/util.c |  4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diffs (18 lines):

diff -r e90f2f58ff6f -r 68878b23d9ee distrib/utils/sysinst/util.c
--- a/distrib/utils/sysinst/util.c      Sat Jun 29 23:24:54 2002 +0000
+++ b/distrib/utils/sysinst/util.c      Sat Jun 29 23:26:02 2002 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: util.c,v 1.67.2.2 2002/06/21 16:03:49 lukem Exp $      */
+/*     $NetBSD: util.c,v 1.67.2.3 2002/06/29 23:26:02 lukem Exp $      */
 
 /*
  * Copyright 1997 Piermont Information Systems Inc.
@@ -614,7 +614,7 @@
                        }
                } else {
                        current->next = malloc(sizeof(struct filelist));
-                       if (head == NULL) {
+                       if (current->next == NULL) {
                                fprintf(stderr, "out of memory\n");
                                exit(1);
                        }



Home | Main Index | Thread Index | Old Index