From: Jan Kiszka <jan.kiszka@web.de>
To: Jean-Christophe DUBOIS <jcd@tribudubois.net>, qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH v4 06/12] fix qemu_alloc/qemu_free for slirp subsystem
Date: Sat, 19 Oct 2013 07:26:25 +0200 [thread overview]
Message-ID: <52621801.3000901@web.de> (raw)
In-Reply-To: <1245358219-13170-7-git-send-email-jcd@tribudubois.net>
[-- Attachment #1: Type: text/plain, Size: 1608 bytes --]
On 2009-06-18 22:50, Jean-Christophe DUBOIS wrote:
> From: Jean-Christophe Dubois <jcd@jcd-laptop.(none)>
>
> Signed-off-by: Jean-Christophe DUBOIS <jcd@tribudubois.net>
> ---
> slirp/socket.c | 8 ++++----
> 1 files changed, 4 insertions(+), 4 deletions(-)
>
> 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;
>
> - so = (struct socket *)malloc(sizeof(struct socket));
> + so = (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 = 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 */
>
> - free(so);
> + qemu_free(so);
> }
>
> 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 = %x", flags);
>
> if ((so = socreate()) == NULL) {
> - /* free(so); Not sofree() ??? free(NULL) == NOP */
> + /* qemu_free(so); Not sofree() ??? qemu_free(NULL) == NOP */
> return NULL;
> }
>
> /* Don't tcp_attach... we don't need so_snd nor so_rcv */
> if ((so->so_tcpcb = tcp_newtcpcb(so)) == NULL) {
> - free(so);
> + qemu_free(so);
> return NULL;
> }
> insque(so,&tcb);
>
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 263 bytes --]
next prev parent reply other threads:[~2013-10-19 5:26 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-06-18 20:50 [Qemu-devel] [PATCH v4 00/12] use qemu_malloc and friends consistently Jean-Christophe DUBOIS
2009-06-18 20:50 ` [Qemu-devel] [PATCH v4 01/12] fix qemu_alloc/qemu_free for block subsystem Jean-Christophe DUBOIS
2009-06-18 20:50 ` [Qemu-devel] [PATCH v4 02/12] fix qemu_alloc/qemu_free for hw subsystem Jean-Christophe DUBOIS
2009-06-18 20:50 ` [Qemu-devel] [PATCH v4 03/12] fix qemu_alloc/qemu_free for bsd-user subsystem Jean-Christophe DUBOIS
2009-06-18 20:50 ` [Qemu-devel] [PATCH v4 04/12] fix qemu_alloc/qemu_free for linux-user subsystem Jean-Christophe DUBOIS
2009-06-18 20:50 ` [Qemu-devel] [PATCH v4 05/12] fix qemu_alloc/qemu_free for target-i386 subsystem Jean-Christophe DUBOIS
2009-06-18 20:50 ` [Qemu-devel] [PATCH v4 06/12] fix qemu_alloc/qemu_free for slirp subsystem Jean-Christophe DUBOIS
2009-06-18 20:50 ` [Qemu-devel] [PATCH v4 07/12] fix qemu_alloc/qemu_free for audio subsystem Jean-Christophe DUBOIS
2009-06-18 20:50 ` [Qemu-devel] [PATCH v4 08/12] fix qemu_alloc/qemu_free for target-arm subsystem Jean-Christophe DUBOIS
2009-06-18 20:50 ` [Qemu-devel] [PATCH v4 09/12] fix qemu_alloc/qemu_free for target-ppc subsystem Jean-Christophe DUBOIS
2009-06-18 20:50 ` [Qemu-devel] [PATCH v4 10/12] fix qemu_alloc/qemu_free for target-sparc subsystem Jean-Christophe DUBOIS
2009-06-18 20:50 ` [Qemu-devel] [PATCH v4 11/12] fix qemu_alloc/qemu_free for tcg subsystem Jean-Christophe DUBOIS
2009-06-18 20:50 ` [Qemu-devel] [PATCH v4 12/12] fix qemu_alloc/qemu_free for main directory Jean-Christophe DUBOIS
2013-10-19 5:26 ` Jan Kiszka [this message]
2009-06-19 10:50 ` [Qemu-devel] [PATCH v4 04/12] fix qemu_alloc/qemu_free for linux-user subsystem vibi sreenivasan
2009-06-19 18:40 ` Jean-Christophe Dubois
2009-06-20 7:01 ` vibi sreenivasan
2009-06-20 9:54 ` Jean-Christophe Dubois
2009-06-20 11:33 ` Andreas Färber
2009-06-19 8:07 ` [Qemu-devel] [PATCH v4 01/12] fix qemu_alloc/qemu_free for block subsystem Kevin Wolf
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=52621801.3000901@web.de \
--to=jan.kiszka@web.de \
--cc=jcd@tribudubois.net \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.