* [9fans] memory leak in cron.c
@ 2000-06-03 8:23 arisawa
0 siblings, 0 replies; only message in thread
From: arisawa @ 2000-06-03 8:23 UTC (permalink / raw)
Hello 9fans,
auth/cron.c has memory leak.
the following function:
void
freejobs(Job *j)
{
Job *fj;
for(fj = j; fj; fj = j){
j = j->next;
free(fj);
}
}
should be replaced by:
void
freejobs(Job *j)
{ Job *i;
while(j){
i = j;
j = j->next;
free(i->cmd);
free(i);
}
}
# sorry, I prefer beginner's programming style.
Kenji Arisawa
E-mail: arisawa@aichi-u.ac.jp
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2000-06-03 8:23 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2000-06-03 8:23 [9fans] memory leak in cron.c arisawa
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).