From mboxrd@z Thu Jan 1 00:00:00 1970 Date: Sat, 3 Jun 2000 17:23:42 +0900 From: arisawa@ar.aichi-u.ac.jp arisawa@ar.aichi-u.ac.jp Subject: [9fans] memory leak in cron.c Topicbox-Message-UUID: b0223842-eac8-11e9-9e20-41e7f4b1d025 Message-ID: <20000603082342.TFaeeUn2-9nxxMCN81TOnwg_eQUiDox2Nomgmj9apGw@z> 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