summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Bushnell <thomas@gnu.org>1998-05-12 17:14:28 +0000
committerThomas Bushnell <thomas@gnu.org>1998-05-12 17:14:28 +0000
commit56b1e0c3869ff369f59ae08ef30a9cf9322707e1 (patch)
treebfa48d0b60c5e1ad097750cf0d9dc39740acc177
parent248ff8ab4e0849e3ebf6276f0fb05e17eea8fbed (diff)
Tue May 12 12:03:38 1998 Thomas Bushnell, n/BSG <tb@mit.edu>
* init.c (setup_terminal): Free LINE after done using it. (process_rc_script): Likewise free RCARGS. Both reported by Katusya Tanaka (wyvern@pb3.so-net.ne.jp).
-rw-r--r--init/ChangeLog6
-rw-r--r--init/init.c4
2 files changed, 9 insertions, 1 deletions
diff --git a/init/ChangeLog b/init/ChangeLog
index 2c9feffa..d8f6122e 100644
--- a/init/ChangeLog
+++ b/init/ChangeLog
@@ -1,3 +1,9 @@
+Tue May 12 12:03:38 1998 Thomas Bushnell, n/BSG <tb@mit.edu>
+
+ * init.c (setup_terminal): Free LINE after done using it.
+ (process_rc_script): Likewise free RCARGS.
+ Both reported by Katusya Tanaka (wyvern@pb3.so-net.ne.jp).
+
1997-06-30 Miles Bader <miles@gnu.ai.mit.edu>
* init.c (bootstrap_args): Initialize to 0.
diff --git a/init/init.c b/init/init.c
index 1eed9eba..a6d80470 100644
--- a/init/init.c
+++ b/init/init.c
@@ -1,6 +1,6 @@
/* Start and maintain hurd core servers and system run state
- Copyright (C) 1993, 1994, 1995, 1996, 1997 Free Software Foundation, Inc.
+ Copyright (C) 1993, 1994, 1995, 1996, 1997, 1998 Free Software Foundation, Inc.
This file is part of the GNU Hurd.
The GNU Hurd is free software; you can redistribute it and/or modify
@@ -506,6 +506,7 @@ setup_terminal (struct terminal *t, struct ttyent *tt)
{
asprintf (&line, "%s %s", tt->ty_getty, tt->ty_name);
argz_create_sep (line, ' ', &t->getty_argz, &t->getty_argz_len);
+ free (line);
if (tt->ty_window)
argz_create_sep (tt->ty_window, ' ',
&t->window_argz, &t->window_argz_len);
@@ -1199,6 +1200,7 @@ process_rc_script ()
system_state = RUNCOM;
rc_pid = run_for_real (rcargs, rcargs, rcargslen, term, 1);
+ free (rcargs);
mach_port_deallocate (mach_task_self (), term);
return ! rc_pid;
}