Fixed a memory leak in lash. It seems that close_all was calling close()

directly instead of calling mark_closed(), which allowed the memory allocated
by mark_open() to never be freed.
 -Erik
This commit is contained in:
Eric Andersen 2001-03-06 20:44:39 +00:00
parent 07f2f3917a
commit 54851d3c65
3 changed files with 3 additions and 3 deletions

2
lash.c
View File

@ -632,7 +632,7 @@ static void close_all()
{
struct close_me *c;
for (c=close_me_head; c; c=c->next) {
close(c->fd);
mark_closed(c->fd);
}
close_me_head = NULL;
}

2
sh.c
View File

@ -632,7 +632,7 @@ static void close_all()
{
struct close_me *c;
for (c=close_me_head; c; c=c->next) {
close(c->fd);
mark_closed(c->fd);
}
close_me_head = NULL;
}

View File

@ -632,7 +632,7 @@ static void close_all()
{
struct close_me *c;
for (c=close_me_head; c; c=c->next) {
close(c->fd);
mark_closed(c->fd);
}
close_me_head = NULL;
}