From: arisawa@ar.aichi-u.ac.jp arisawa@ar.aichi-u.ac.jp
Subject: [9fans] memory leak in cron.c
Date: Sat, 3 Jun 2000 17:23:42 +0900 [thread overview]
Message-ID: <20000603082342.TFaeeUn2-9nxxMCN81TOnwg_eQUiDox2Nomgmj9apGw@z> (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
reply other threads:[~2000-06-03 8:23 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20000603082342.TFaeeUn2-9nxxMCN81TOnwg_eQUiDox2Nomgmj9apGw@z \
--to=arisawa@ar.aichi-u.ac.jp \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).