Subject: Re: /etc/login.conf required to exist after user(8) changes
To: None <current-users@NetBSD.org>
From: Peter Seebach <firstname.lastname@example.org>
Date: 07/29/2005 06:32:35
In message <200507291103.j6TB3miD021103@vtn1.victoria.tc.ca>, John Nemeth write
> I think more to the point, it is irrelevant that the pointer has
>been freed. It will still contain the same value. The freeing
>function can not modify the pointer itself; therefore, the second half
>of the patch is completely unnecessary. Trying to use the data pointed
>to by the pointer would be wrong; however, the original code doesn't do
>this, it merely compares the pointer to NULL.
To be picky, there exist C implementations where at least some, possibly
all, pointers to freed space compare equal to NULL.
However, there also exist platforms on which any reference to them, even
a comparison to NULL, causes undefined behavior.
If the pointer is freed, it should not be referenced, even to compare it