From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:33427) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WHjvN-0004HQ-2q for qemu-devel@nongnu.org; Sun, 23 Feb 2014 20:01:42 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WHjvH-0007Um-Je for qemu-devel@nongnu.org; Sun, 23 Feb 2014 20:01:37 -0500 Sender: fluxion Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable From: Michael Roth In-Reply-To: <1392986209-32162-1-git-send-email-armbru@redhat.com> References: <1392986209-32162-1-git-send-email-armbru@redhat.com> Message-ID: <20140224010127.3593.72999@loki> Date: Sun, 23 Feb 2014 19:01:27 -0600 Subject: Re: [Qemu-devel] [PATCH] qga: Fix memory allocation pasto List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Markus Armbruster , qemu-devel@nongnu.org Cc: qemu-trivial@nongnu.org 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 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 han= dle, int64_t offset, > if (ret =3D=3D -1) { > error_setg_errno(err, errno, "failed to seek file"); > } else { > - seek_data =3D g_malloc0(sizeof(GuestFileRead)); > + seek_data =3D g_new0(GuestFileSeek, 1); > seek_data->position =3D ftell(fh); > seek_data->eof =3D feof(fh); > } > -- = > 1.8.1.4