Re: [Qemu-devel] [PATCH for-3.1 2/4] slirp: Use g_new() to allocate sockets in socreate()

2018-11-06 Thread Samuel Thibault
Peter Maydell, le mar. 06 nov. 2018 15:13:21 +, a ecrit: > 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

[Qemu-devel] [PATCH for-3.1 2/4] slirp: Use g_new() to allocate sockets in socreate()

2018-11-06 Thread Peter Maydell
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 --- We already use g_new/g_malloc in slirp, including for mbuf