[ovs-dev] [PATCH] ofp-parse: Correctly update bucket lists if they are empty
Thomas Graf
tgraf at noironetworks.com
Wed Jan 28 22:33:05 UTC 2015
On 01/28/15 at 01:22pm, Ben Pfaff wrote:
> Are you sure? What *gms points to, that is, **gms, is freed, but *gms
> should still point to the same location. list_moved() never
> dereferences 'orig', only compares it against list->next. In a very
> language-lawyer way, working with a pointer to freed memory may be
> technically "undefined behavior", but I don't know of bad effects in
> practice.
What Ben proposed is definitely fine. It's like a NULL check except
that NULL is not 0x0 but something else ;-)
More information about the dev
mailing list