[PATCH] cpukit/libnetworking/libc/getifaddrs.c: Fix undefined behavior on freeing auto variable if NET_RT_IFLIST isn't defined.

Martin Galvan martin.galvan at tallertechnologies.com
Wed Oct 14 13:33:00 UTC 2015


On Wed, Oct 14, 2015 at 4:59 AM, Sebastian Huber
<sebastian.huber at embedded-brains.de> wrote:
> Since NET_RT_IFLIST is defined in socket.h, the else block is essentially
> dead code. How did you find this problem? Does it make sense to use the
> latest FreeBSD version?

It was one of the errors reported by CppCheck a while ago. I
originally wasn't going to fix it because it's FreeBSD code, but then
I found out it's being maintained as an out-of-tree fork so I did.

Should I just remove the #else cases, then?



More information about the devel mailing list