[PATCH] cpukit/libnetworking/libc/getifaddrs.c: Fix undefined behavior on freeing auto variable if NET_RT_IFLIST isn't defined.
Gedare Bloom
gedare at rtems.org
Wed Oct 14 20:20:59 UTC 2015
On Wed, Oct 14, 2015 at 9:33 AM, Martin Galvan
<martin.galvan at tallertechnologies.com> wrote:
> 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?
Sounds good to me.
More information about the devel
mailing list