summaryrefslogtreecommitdiffstats
path: root/slirp/tcp_input.c
diff options
context:
space:
mode:
authorPeter Maydell2018-11-12 11:12:07 +0100
committerPeter Maydell2018-11-12 11:12:07 +0100
commit460f0236c12a86a38692c12d9bf8e2391dc10a77 (patch)
treea4a505288b3fa853c28f6edddefbe5d3c1fca74c /slirp/tcp_input.c
parentMerge remote-tracking branch 'remotes/gkurz/tags/for-upstream' into staging (diff)
parentslirp: fork_exec(): create and connect child socket before fork() (diff)
downloadqemu-460f0236c12a86a38692c12d9bf8e2391dc10a77.tar.gz
qemu-460f0236c12a86a38692c12d9bf8e2391dc10a77.tar.xz
qemu-460f0236c12a86a38692c12d9bf8e2391dc10a77.zip
Merge remote-tracking branch 'remotes/thibault/tags/samuel-thibault' into staging
slirp updates Peter Maydell (4): slirp: Don't pass possibly -1 fd to send() slirp: Use g_new() to allocate sockets in socreate() slirp: Remove code that handles socreate() failure slirp: fork_exec(): create and connect child socket before fork() # gpg: Signature made Sat 10 Nov 2018 14:08:53 GMT # gpg: using RSA key E3F65A9E9560DB4C # gpg: Good signature from "Samuel Thibault <samuel.thibault@aquilenet.fr>" # gpg: aka "Samuel Thibault <sthibault@debian.org>" # gpg: aka "Samuel Thibault <samuel.thibault@gnu.org>" # gpg: aka "Samuel Thibault <samuel.thibault@inria.fr>" # gpg: aka "Samuel Thibault <samuel.thibault@labri.fr>" # gpg: aka "Samuel Thibault <samuel.thibault@ens-lyon.org>" # gpg: aka "Samuel Thibault <samuel.thibault@u-bordeaux.fr>" # gpg: WARNING: This key is not certified with sufficiently trusted signatures! # gpg: It is not certain that the signature belongs to the owner. # Primary key fingerprint: 900C B024 B679 31D4 0F82 304B D017 8C76 7D06 9EE6 # Subkey fingerprint: 33FA 7B64 6195 01F8 CE9C 8F97 E3F6 5A9E 9560 DB4C * remotes/thibault/tags/samuel-thibault: slirp: fork_exec(): create and connect child socket before fork() slirp: Remove code that handles socreate() failure slirp: Use g_new() to allocate sockets in socreate() slirp: Don't pass possibly -1 fd to send() Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'slirp/tcp_input.c')
-rw-r--r--slirp/tcp_input.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/slirp/tcp_input.c b/slirp/tcp_input.c
index 07bcbdb2dd..d073ef9525 100644
--- a/slirp/tcp_input.c
+++ b/slirp/tcp_input.c
@@ -429,11 +429,10 @@ findso:
if ((tiflags & (TH_SYN|TH_FIN|TH_RST|TH_URG|TH_ACK)) != TH_SYN)
goto dropwithreset;
- if ((so = socreate(slirp)) == NULL)
- goto dropwithreset;
+ so = socreate(slirp);
if (tcp_attach(so) < 0) {
- free(so); /* Not sofree (if it failed, it's not insqued) */
- goto dropwithreset;
+ g_free(so); /* Not sofree (if it failed, it's not insqued) */
+ goto dropwithreset;
}
sbreserve(&so->so_snd, TCP_SNDSPACE);