All of lore.kernel.org
 help / color / mirror / Atom feed
From: Markus Armbruster <armbru@redhat.com>
To: Md Haris Iqbal <haris.phnx@gmail.com>
Cc: qemu-trivial@nongnu.org, qemu-devel@nongnu.org
Subject: Re: [Qemu-trivial] [Qemu-devel] [PATCH] Changed malloc() to g_malloc() at places where return value was not being checked
Date: Tue, 22 Mar 2016 16:15:51 +0100	[thread overview]
Message-ID: <877fgumtlk.fsf@blackfin.pond.sub.org> (raw)
In-Reply-To: <1458657219-12156-1-git-send-email-haris.phnx@gmail.com> (Md Haris Iqbal's message of "Tue, 22 Mar 2016 20:03:39 +0530")

Md Haris Iqbal <haris.phnx@gmail.com> writes:

> Signed-off-by: Md Haris Iqbal <haris.phnx@gmail.com>
> ---
>  bsd-user/elfload.c | 2 +-
>  bsd-user/qemu.h    | 2 +-
>  linux-user/qemu.h  | 2 +-
>  thunk.c            | 2 +-
>  ui/shader.c        | 2 +-
>  5 files changed, 5 insertions(+), 5 deletions(-)
>
> diff --git a/bsd-user/elfload.c b/bsd-user/elfload.c
> index 0a6092b..40bd1f2 100644
> --- a/bsd-user/elfload.c
> +++ b/bsd-user/elfload.c
> @@ -1064,7 +1064,7 @@ static void load_symbols(struct elfhdr *hdr, int fd)
>  
>   found:
>      /* Now know where the strtab and symtab are.  Snarf them. */
> -    s = malloc(sizeof(*s));
> +    s = g_malloc(sizeof(*s));
>      syms = malloc(symtab.sh_size);
>      if (!syms) {
>          free(s);

You need to track down where s is freed and change from free() to
g_free() there.  One such spot is visible in context.  Same for the
rest of the patch.

[...]


WARNING: multiple messages have this Message-ID (diff)
From: Markus Armbruster <armbru@redhat.com>
To: Md Haris Iqbal <haris.phnx@gmail.com>
Cc: qemu-trivial@nongnu.org, qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH] Changed malloc() to g_malloc() at places where return value was not being checked
Date: Tue, 22 Mar 2016 16:15:51 +0100	[thread overview]
Message-ID: <877fgumtlk.fsf@blackfin.pond.sub.org> (raw)
In-Reply-To: <1458657219-12156-1-git-send-email-haris.phnx@gmail.com> (Md Haris Iqbal's message of "Tue, 22 Mar 2016 20:03:39 +0530")

Md Haris Iqbal <haris.phnx@gmail.com> writes:

> Signed-off-by: Md Haris Iqbal <haris.phnx@gmail.com>
> ---
>  bsd-user/elfload.c | 2 +-
>  bsd-user/qemu.h    | 2 +-
>  linux-user/qemu.h  | 2 +-
>  thunk.c            | 2 +-
>  ui/shader.c        | 2 +-
>  5 files changed, 5 insertions(+), 5 deletions(-)
>
> diff --git a/bsd-user/elfload.c b/bsd-user/elfload.c
> index 0a6092b..40bd1f2 100644
> --- a/bsd-user/elfload.c
> +++ b/bsd-user/elfload.c
> @@ -1064,7 +1064,7 @@ static void load_symbols(struct elfhdr *hdr, int fd)
>  
>   found:
>      /* Now know where the strtab and symtab are.  Snarf them. */
> -    s = malloc(sizeof(*s));
> +    s = g_malloc(sizeof(*s));
>      syms = malloc(symtab.sh_size);
>      if (!syms) {
>          free(s);

You need to track down where s is freed and change from free() to
g_free() there.  One such spot is visible in context.  Same for the
rest of the patch.

[...]

  parent reply	other threads:[~2016-03-22 15:16 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-03-22 14:33 [Qemu-trivial] [PATCH] Changed malloc() to g_malloc() at places where return value was not being checked Md Haris Iqbal
2016-03-22 14:33 ` [Qemu-devel] " Md Haris Iqbal
2016-03-22 14:57 ` [Qemu-trivial] " Peter Maydell
2016-03-22 14:57   ` Peter Maydell
2016-03-22 15:52   ` [Qemu-trivial] " haris iqbal
2016-03-22 15:52     ` haris iqbal
2016-03-22 16:05     ` [Qemu-trivial] " Paolo Bonzini
2016-03-22 16:05       ` [Qemu-devel] " Paolo Bonzini
2016-03-22 16:15       ` [Qemu-trivial] " haris iqbal
2016-03-22 16:15         ` [Qemu-devel] " haris iqbal
2016-03-22 16:46         ` [Qemu-trivial] " Peter Maydell
2016-03-22 16:46           ` [Qemu-devel] " Peter Maydell
2016-03-22 16:50           ` [Qemu-trivial] " haris iqbal
2016-03-22 16:50             ` [Qemu-devel] " haris iqbal
2016-03-22 15:15 ` Markus Armbruster [this message]
2016-03-22 15:15   ` Markus Armbruster
2016-03-22 15:52   ` [Qemu-trivial] " haris iqbal
2016-03-22 15:52     ` haris iqbal

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=877fgumtlk.fsf@blackfin.pond.sub.org \
    --to=armbru@redhat.com \
    --cc=haris.phnx@gmail.com \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-trivial@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.