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:
parent
07f2f3917a
commit
54851d3c65
2
lash.c
2
lash.c
@ -632,7 +632,7 @@ static void close_all()
|
|||||||
{
|
{
|
||||||
struct close_me *c;
|
struct close_me *c;
|
||||||
for (c=close_me_head; c; c=c->next) {
|
for (c=close_me_head; c; c=c->next) {
|
||||||
close(c->fd);
|
mark_closed(c->fd);
|
||||||
}
|
}
|
||||||
close_me_head = NULL;
|
close_me_head = NULL;
|
||||||
}
|
}
|
||||||
|
2
sh.c
2
sh.c
@ -632,7 +632,7 @@ static void close_all()
|
|||||||
{
|
{
|
||||||
struct close_me *c;
|
struct close_me *c;
|
||||||
for (c=close_me_head; c; c=c->next) {
|
for (c=close_me_head; c; c=c->next) {
|
||||||
close(c->fd);
|
mark_closed(c->fd);
|
||||||
}
|
}
|
||||||
close_me_head = NULL;
|
close_me_head = NULL;
|
||||||
}
|
}
|
||||||
|
@ -632,7 +632,7 @@ static void close_all()
|
|||||||
{
|
{
|
||||||
struct close_me *c;
|
struct close_me *c;
|
||||||
for (c=close_me_head; c; c=c->next) {
|
for (c=close_me_head; c; c=c->next) {
|
||||||
close(c->fd);
|
mark_closed(c->fd);
|
||||||
}
|
}
|
||||||
close_me_head = NULL;
|
close_me_head = NULL;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user