From: Michael Roth <mdroth@linux.vnet.ibm.com>
To: Markus Armbruster <armbru@redhat.com>, qemu-devel@nongnu.org
Cc: qemu-trivial@nongnu.org
Subject: Re: [Qemu-trivial] [Qemu-devel] [PATCH] qga: Fix memory allocation pasto
Date: Sun, 23 Feb 2014 19:01:27 -0600 [thread overview]
Message-ID: <20140224010127.3593.72999@loki> (raw)
In-Reply-To: <1392986209-32162-1-git-send-email-armbru@redhat.com>
Quoting Markus Armbruster (2014-02-21 06:36:49)
> qmp_guest_file_seek() allocates memory for a GuestFileRead object
> instead of the GuestFileSeek object it actually uses. Harmless,
> because the GuestFileRead is slightly larger.
>
> Signed-off-by: Markus Armbruster <armbru@redhat.com>
Thanks, applied to qga tree:
https://github.com/mdroth/qemu/commits/qga
> ---
> qga/commands-posix.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/qga/commands-posix.c b/qga/commands-posix.c
> index cae4171..2c496b6 100644
> --- a/qga/commands-posix.c
> +++ b/qga/commands-posix.c
> @@ -525,7 +525,7 @@ struct GuestFileSeek *qmp_guest_file_seek(int64_t handle, int64_t offset,
> if (ret == -1) {
> error_setg_errno(err, errno, "failed to seek file");
> } else {
> - seek_data = g_malloc0(sizeof(GuestFileRead));
> + seek_data = g_new0(GuestFileSeek, 1);
> seek_data->position = ftell(fh);
> seek_data->eof = feof(fh);
> }
> --
> 1.8.1.4
WARNING: multiple messages have this Message-ID (diff)
From: Michael Roth <mdroth@linux.vnet.ibm.com>
To: Markus Armbruster <armbru@redhat.com>, qemu-devel@nongnu.org
Cc: qemu-trivial@nongnu.org
Subject: Re: [Qemu-devel] [PATCH] qga: Fix memory allocation pasto
Date: Sun, 23 Feb 2014 19:01:27 -0600 [thread overview]
Message-ID: <20140224010127.3593.72999@loki> (raw)
In-Reply-To: <1392986209-32162-1-git-send-email-armbru@redhat.com>
Quoting Markus Armbruster (2014-02-21 06:36:49)
> qmp_guest_file_seek() allocates memory for a GuestFileRead object
> instead of the GuestFileSeek object it actually uses. Harmless,
> because the GuestFileRead is slightly larger.
>
> Signed-off-by: Markus Armbruster <armbru@redhat.com>
Thanks, applied to qga tree:
https://github.com/mdroth/qemu/commits/qga
> ---
> qga/commands-posix.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/qga/commands-posix.c b/qga/commands-posix.c
> index cae4171..2c496b6 100644
> --- a/qga/commands-posix.c
> +++ b/qga/commands-posix.c
> @@ -525,7 +525,7 @@ struct GuestFileSeek *qmp_guest_file_seek(int64_t handle, int64_t offset,
> if (ret == -1) {
> error_setg_errno(err, errno, "failed to seek file");
> } else {
> - seek_data = g_malloc0(sizeof(GuestFileRead));
> + seek_data = g_new0(GuestFileSeek, 1);
> seek_data->position = ftell(fh);
> seek_data->eof = feof(fh);
> }
> --
> 1.8.1.4
next prev parent reply other threads:[~2014-02-24 1:01 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-02-21 12:36 [Qemu-trivial] [PATCH] qga: Fix memory allocation pasto Markus Armbruster
2014-02-21 12:36 ` [Qemu-devel] " Markus Armbruster
2014-02-21 13:44 ` [Qemu-trivial] " Eric Blake
2014-02-21 13:44 ` Eric Blake
2014-02-24 1:01 ` Michael Roth [this message]
2014-02-24 1:01 ` Michael Roth
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=20140224010127.3593.72999@loki \
--to=mdroth@linux.vnet.ibm.com \
--cc=armbru@redhat.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.