Source-Changes-HG archive

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

[src/netbsd-1-5]: src/sbin/sysctl Pullup revision 1.41 (requested by thorpej):



details:   https://anonhg.NetBSD.org/src/rev/b535b11ceac5
branches:  netbsd-1-5
changeset: 488625:b535b11ceac5
user:      enami <enami%NetBSD.org@localhost>
date:      Sat Jul 22 01:47:47 2000 +0000

description:
Pullup revision 1.41 (requested by thorpej):
Free storage allocated by fparseln.

diffstat:

 sbin/sysctl/sysctl.c |  10 +++++-----
 1 files changed, 5 insertions(+), 5 deletions(-)

diffs (32 lines):

diff -r 991fa6e65242 -r b535b11ceac5 sbin/sysctl/sysctl.c
--- a/sbin/sysctl/sysctl.c      Sat Jul 22 01:45:39 2000 +0000
+++ b/sbin/sysctl/sysctl.c      Sat Jul 22 01:47:47 2000 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: sysctl.c,v 1.37.2.1 2000/07/15 02:01:28 itojun Exp $   */
+/*     $NetBSD: sysctl.c,v 1.37.2.2 2000/07/22 01:47:47 enami Exp $    */
 
 /*
  * Copyright (c) 1993
@@ -44,7 +44,7 @@
 #if 0
 static char sccsid[] = "@(#)sysctl.c   8.1 (Berkeley) 6/6/93";
 #else
-__RCSID("$NetBSD: sysctl.c,v 1.37.2.1 2000/07/15 02:01:28 itojun Exp $");
+__RCSID("$NetBSD: sysctl.c,v 1.37.2.2 2000/07/22 01:47:47 enami Exp $");
 #endif
 #endif /* not lint */
 
@@ -238,10 +238,10 @@
                if (fp == NULL) {
                        err(1, "%s", fn);
                } else {
-                       while ((l = fparseln(fp, NULL, NULL, NULL, 0))) {
-                               if (*l) {
+                       for (; (l = fparseln(fp, NULL, NULL, NULL, 0)) != NULL;
+                           free(l)) {
+                               if (*l)
                                        parse(l, 1);
-                               }
                        }
                        fclose(fp);
                }



Home | Main Index | Thread Index | Old Index