[ovs-dev] [coverity 02/14] leak-checker: Fix warning about use after free in hook_free().

Justin Pettit jpettit at nicira.com
Tue Feb 22 17:37:25 UTC 2011


On Feb 22, 2011, at 9:30 AM, Ben Pfaff wrote:

> On Mon, Feb 21, 2011 at 05:44:45PM -0800, Justin Pettit wrote:
>> Coverity complains of a use after free error in hook_free().  Since this
>> is only printing the pointer address it should be fine, but at the very
>> least it looks odd.
>> 
>> Coverity #11069
> 
> Applying this patch will break the leak checker, since the "free" has to
> occur with the libc implementation of free().  Otherwise free() will
> call back into hook_free() and we'll just get an infinite loop (that
> terminates when we run out of stack space).


Thanks for catching that.  I've dropped it from my patch queue.  We can figure out how to quiet Coverity up later.

--Justin






More information about the dev mailing list