Re: [PATCH] cxgb4: fix undefined behavior in mem.c
From: Christopher Lameter
Date: Fri Mar 01 2019 - 13:15:57 EST
On Thu, 28 Feb 2019, Shaobo He wrote:
> I think maybe the more problematic issue is that the value of a freed pointer
> is intermediate.
The pointer is not affected by freeing the data it points to. Thus it
definitely has the same value as before and is not indeterminate.
The pointer points now to an area of memory that could now be in use for
different purposes so maybe it could be taken as a dangerous situation.
But situations like that are common in code.