From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:40420) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VXP3g-0003ZP-Tv for qemu-devel@nongnu.org; Sat, 19 Oct 2013 01:26:46 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VXP3a-0006sy-Va for qemu-devel@nongnu.org; Sat, 19 Oct 2013 01:26:40 -0400 Received: from mout.web.de ([212.227.17.11]:65073) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VXP3a-0006sY-LM for qemu-devel@nongnu.org; Sat, 19 Oct 2013 01:26:34 -0400 Received: from mchn199C.mchp.siemens.de ([95.157.58.223]) by smtp.web.de (mrweb102) with ESMTPSA (Nemesis) id 0M1XDJ-1Vrfzl3fHV-00tTtu for ; Sat, 19 Oct 2013 07:26:32 +0200 Message-ID: <52621801.3000901@web.de> Date: Sat, 19 Oct 2013 07:26:25 +0200 From: Jan Kiszka MIME-Version: 1.0 References: <1245358219-13170-1-git-send-email-jcd@tribudubois.net> <1245358219-13170-2-git-send-email-jcd@tribudubois.net> <1245358219-13170-3-git-send-email-jcd@tribudubois.net> <1245358219-13170-4-git-send-email-jcd@tribudubois.net> <1245358219-13170-5-git-send-email-jcd@tribudubois.net> <1245358219-13170-6-git-send-email-jcd@tribudubois.net> <1245358219-13170-7-git-send-email-jcd@tribudubois.net> In-Reply-To: <1245358219-13170-7-git-send-email-jcd@tribudubois.net> Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="1F8V2Xqf8hk0wh258NPMEVBK44NsliT7h" Subject: Re: [Qemu-devel] [PATCH v4 06/12] fix qemu_alloc/qemu_free for slirp subsystem List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Jean-Christophe DUBOIS , qemu-devel@nongnu.org This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --1F8V2Xqf8hk0wh258NPMEVBK44NsliT7h Content-Type: text/plain; charset=ISO-8859-15 Content-Transfer-Encoding: quoted-printable On 2009-06-18 22:50, Jean-Christophe DUBOIS wrote: > From: Jean-Christophe Dubois >=20 > Signed-off-by: Jean-Christophe DUBOIS > --- > slirp/socket.c | 8 ++++---- > 1 files changed, 4 insertions(+), 4 deletions(-) >=20 > diff --git a/slirp/socket.c b/slirp/socket.c > index 82d026c..e4d84d7 100644 > --- a/slirp/socket.c > +++ b/slirp/socket.c > @@ -53,7 +53,7 @@ socreate(void) > { > struct socket *so; > =20 > - so =3D (struct socket *)malloc(sizeof(struct socket)); > + so =3D (struct socket *)qemu_malloc(sizeof(struct socket)); > if(so) { qemu_malloc doesn't return NULL. So you should clean up more here, and possibly elsewhere. Jan > memset(so, 0, sizeof(struct socket)); > so->so_state =3D SS_NOFDREF; > @@ -82,7 +82,7 @@ sofree(struct socket *so) > if(so->so_next && so->so_prev) > remque(so); /* crashes if so is not in a queue */ > =20 > - free(so); > + qemu_free(so); > } > =20 > size_t sopreprbuf(struct socket *so, struct iovec *iov, int *np) > @@ -606,13 +606,13 @@ solisten(u_int port, u_int32_t laddr, u_int lport= , int flags) > DEBUG_ARG("flags =3D %x", flags); > =20 > if ((so =3D socreate()) =3D=3D NULL) { > - /* free(so); Not sofree() ??? free(NULL) =3D=3D NOP */ > + /* qemu_free(so); Not sofree() ??? qemu_free(NULL) =3D=3D NOP = */ > return NULL; > } > =20 > /* Don't tcp_attach... we don't need so_snd nor so_rcv */ > if ((so->so_tcpcb =3D tcp_newtcpcb(so)) =3D=3D NULL) { > - free(so); > + qemu_free(so); > return NULL; > } > insque(so,&tcb); >=20 --1F8V2Xqf8hk0wh258NPMEVBK44NsliT7h Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.19 (GNU/Linux) Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iEYEARECAAYFAlJiGAUACgkQitSsb3rl5xTp4wCeNk8/cJorDH/nqD7jhTzTdjkl 40UAnRiFTs+15w9XxJdqY52k8L35eHuN =2kJ2 -----END PGP SIGNATURE----- --1F8V2Xqf8hk0wh258NPMEVBK44NsliT7h--