Source-Changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: CVS commit: src/usr.sbin/arp



    Date:        Fri, 15 Aug 2003 07:48:18 +0900 (JST)
    From:        itojun%itojun.org@localhost (Jun-ichiro itojun Hagino)
    Message-ID:  <20030814224818.CA22C9B%coconut.itojun.org@localhost>

  |     i don't think so, it is a good practice to free() even if exit() will
  |     take care of it.  there's no bad sideeffect.

It makes the code bigger, and wastes time for no purpose.   In this case
that isn't particularly bad, but it isn't needed for anything either, and
it isn't good practice to add any code that has no useful effect.

If you wanted to go down this road, then you really also need to get every
program and make sure to fclose(stdin); fclose(stdout); fclose(stderr);
just in case stdio allocated a buffer for one of those, so that buffer
can be freed as well.

None of this kind of nonsense is needed, it accomplishes nothing.

kre




Home | Main Index | Thread Index | Old Index