[Git][slirp/libslirp][master] udp: Make cleanup loop clearer
Samuel Thibault (@sthibaul)
gitlab at gitlab.freedesktop.org
Thu Apr 25 14:28:11 UTC 2024
Samuel Thibault pushed to branch master at slirp / libslirp
Commits:
c76d880a by Samuel Thibault at 2024-04-25T16:25:59+02:00
udp: Make cleanup loop clearer
382bff02f21b ("Fix possible infinite loops and use-after-free") rewrote
the loop to make it cleaner that we go through items, but was always
detaching the first elements, which happens to be right, but less
clear than detaching the element being processed.
Fixes #32
Reported-by: Peter Maydell
- - - - -
1 changed file:
- src/udp.c
Changes:
=====================================
src/udp.c
=====================================
@@ -56,7 +56,7 @@ void udp_cleanup(Slirp *slirp)
for (so = slirp->udb.so_next; so != &slirp->udb; so = so_next) {
so_next = so->so_next;
- udp_detach(slirp->udb.so_next);
+ udp_detach(so);
}
}
View it on GitLab: https://gitlab.freedesktop.org/slirp/libslirp/-/commit/c76d880a2cb5460132dab20eaac6867f9196df98
--
View it on GitLab: https://gitlab.freedesktop.org/slirp/libslirp/-/commit/c76d880a2cb5460132dab20eaac6867f9196df98
You're receiving this email because of your account on gitlab.freedesktop.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/slirp/attachments/20240425/5b221f8c/attachment.htm>
More information about the Slirp
mailing list