Unlike FreeBSD we use a ifmultiaddr struct field to store the address and let

the ifma_addr point to that. Therefore freeing it caused a misaligned free and
then a double free, resulting in heap corruption for the next user to fall
victim to. Only happened when removing multicast addresses though.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@42899 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Michael Lotz 2011-10-24 10:21:22 +00:00
parent bbf37742d3
commit a3f90d5cca

View File

@ -406,7 +406,6 @@ if_freemulti(struct ifmultiaddr *ifma)
if (ifma->ifma_lladdr != NULL)
free(ifma->ifma_lladdr);
free(ifma->ifma_addr);
free(ifma);
}