slirp: Use g_new() to allocate sockets in socreate()
commit84ec9bfaf239b61bac3e43f708772937401e0e63
authorPeter Maydell <peter.maydell@linaro.org>
Tue, 6 Nov 2018 15:13:21 +0000 (6 15:13 +0000)
committerSamuel Thibault <samuel.thibault@ens-lyon.org>
Sat, 10 Nov 2018 14:07:53 +0000 (10 15:07 +0100)
treec51ce911638e94b4a5d91079c0b85491eccf8901
parentc41868152a95db5f759bb7da491615eca99e9a40
slirp: Use g_new() to allocate sockets in socreate()

The slirp socreate() function can only fail if the attempt
to malloc() the struct socket fails. Switch to using
g_new() instead, which will allow us to remove the
error-handling code from its callers.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
slirp/socket.c
slirp/tcp_input.c
slirp/tcp_subr.c