diff options
author | jeremy marchand <jeremy.marchand@etu.u-bordeaux.fr> | 2021-02-18 17:56:37 +0100 |
---|---|---|
committer | jeremy marchand <jeremy.marchand@etu.u-bordeaux.fr> | 2021-02-18 18:56:17 +0100 |
commit | ff605089bb8f06808e8a30a0362cc908f42f057c (patch) | |
tree | bae6824ae23713ad51cf19109865ddab4bb0ab0e | |
parent | 99b3b70af627980ee3490944c702b42fc855ef2a (diff) | |
download | slirp-ff605089bb8f06808e8a30a0362cc908f42f057c.zip slirp-ff605089bb8f06808e8a30a0362cc908f42f057c.tar.gz slirp-ff605089bb8f06808e8a30a0362cc908f42f057c.tar.bz2 |
m_free: remove the M_EXT flag after freeing the mbuf extended buffer
mbufs added to the freelist shouldn't keep the M_EXT flag as they can be
recycled and the new owner could try to access the freed extended buffer.
-rw-r--r-- | src/mbuf.c | 1 |
1 files changed, 1 insertions, 0 deletions
@@ -105,6 +105,7 @@ void m_free(struct mbuf *m) /* If it's M_EXT, free() it */ if (m->m_flags & M_EXT) { g_free(m->m_ext); + m->m_flags &= ~M_EXT; } /* * Either free() it or put it on the free list |