All of lore.kernel.org
 help / color / mirror / Atom feed
* [Qemu-devel] [PULL 0/1] virtio-gpu: fix memory leak in virtio_gpu_resource_create_2d
@ 2016-10-27 14:33 Gerd Hoffmann
  2016-10-27 14:33 ` [Qemu-devel] [PULL 1/1] " Gerd Hoffmann
  2016-10-28  9:51 ` [Qemu-devel] [PULL 0/1] " Peter Maydell
  0 siblings, 2 replies; 3+ messages in thread
From: Gerd Hoffmann @ 2016-10-27 14:33 UTC (permalink / raw)
  To: qemu-devel; +Cc: Gerd Hoffmann

  Hi,

vga patch queue with a virtio-gpu memory leak fix.#

please pull,
  Gerd

The following changes since commit ede0cbeb7892bdf4a19128853a3a3c61a17fb068:

  Merge remote-tracking branch 'remotes/armbru/tags/pull-qapi-2016-10-25' into staging (2016-10-25 17:03:11 +0100)

are available in the git repository at:


  git://git.kraxel.org/qemu tags/pull-vga-20161027-1

for you to fetch changes up to cb3a0522b694cc5bb6424497b3f828ccd28fd1dd:

  virtio-gpu: fix memory leak in virtio_gpu_resource_create_2d (2016-10-26 14:52:21 +0200)

----------------------------------------------------------------
virtio-gpu: fix memory leak in virtio_gpu_resource_create_2d

----------------------------------------------------------------
Li Qiang (1):
      virtio-gpu: fix memory leak in virtio_gpu_resource_create_2d

 hw/display/virtio-gpu.c | 1 +
 1 file changed, 1 insertion(+)

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [Qemu-devel] [PULL 1/1] virtio-gpu: fix memory leak in virtio_gpu_resource_create_2d
  2016-10-27 14:33 [Qemu-devel] [PULL 0/1] virtio-gpu: fix memory leak in virtio_gpu_resource_create_2d Gerd Hoffmann
@ 2016-10-27 14:33 ` Gerd Hoffmann
  2016-10-28  9:51 ` [Qemu-devel] [PULL 0/1] " Peter Maydell
  1 sibling, 0 replies; 3+ messages in thread
From: Gerd Hoffmann @ 2016-10-27 14:33 UTC (permalink / raw)
  To: qemu-devel; +Cc: Li Qiang, Gerd Hoffmann, Michael S. Tsirkin

From: Li Qiang <liqiang6-s@360.cn>

In virtio gpu resource create dispatch, if the pixman format is zero
it doesn't free the resource object allocated previously. Thus leading
a host memory leak issue. This patch avoid this.

Signed-off-by: Li Qiang <liqiang6-s@360.cn>
Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Message-id: 57df486e.8379240a.c3620.ff81@mx.google.com
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
---
 hw/display/virtio-gpu.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/hw/display/virtio-gpu.c b/hw/display/virtio-gpu.c
index fa6fd0e..60bce94 100644
--- a/hw/display/virtio-gpu.c
+++ b/hw/display/virtio-gpu.c
@@ -333,6 +333,7 @@ static void virtio_gpu_resource_create_2d(VirtIOGPU *g,
         qemu_log_mask(LOG_GUEST_ERROR,
                       "%s: host couldn't handle guest format %d\n",
                       __func__, c2d.format);
+        g_free(res);
         cmd->error = VIRTIO_GPU_RESP_ERR_INVALID_PARAMETER;
         return;
     }
-- 
1.8.3.1

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [Qemu-devel] [PULL 0/1] virtio-gpu: fix memory leak in virtio_gpu_resource_create_2d
  2016-10-27 14:33 [Qemu-devel] [PULL 0/1] virtio-gpu: fix memory leak in virtio_gpu_resource_create_2d Gerd Hoffmann
  2016-10-27 14:33 ` [Qemu-devel] [PULL 1/1] " Gerd Hoffmann
@ 2016-10-28  9:51 ` Peter Maydell
  1 sibling, 0 replies; 3+ messages in thread
From: Peter Maydell @ 2016-10-28  9:51 UTC (permalink / raw)
  To: Gerd Hoffmann; +Cc: QEMU Developers

On 27 October 2016 at 15:33, Gerd Hoffmann <kraxel@redhat.com> wrote:
>   Hi,
>
> vga patch queue with a virtio-gpu memory leak fix.#
>
> please pull,
>   Gerd
>
> The following changes since commit ede0cbeb7892bdf4a19128853a3a3c61a17fb068:
>
>   Merge remote-tracking branch 'remotes/armbru/tags/pull-qapi-2016-10-25' into staging (2016-10-25 17:03:11 +0100)
>
> are available in the git repository at:
>
>
>   git://git.kraxel.org/qemu tags/pull-vga-20161027-1
>
> for you to fetch changes up to cb3a0522b694cc5bb6424497b3f828ccd28fd1dd:
>
>   virtio-gpu: fix memory leak in virtio_gpu_resource_create_2d (2016-10-26 14:52:21 +0200)
>
> ----------------------------------------------------------------
> virtio-gpu: fix memory leak in virtio_gpu_resource_create_2d
>
> ----------------------------------------------------------------
> Li Qiang (1):
>       virtio-gpu: fix memory leak in virtio_gpu_resource_create_2d
>
>  hw/display/virtio-gpu.c | 1 +
>  1 file changed, 1 insertion(+)

Applied, thanks.

-- PMM

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2016-10-28  9:51 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-10-27 14:33 [Qemu-devel] [PULL 0/1] virtio-gpu: fix memory leak in virtio_gpu_resource_create_2d Gerd Hoffmann
2016-10-27 14:33 ` [Qemu-devel] [PULL 1/1] " Gerd Hoffmann
2016-10-28  9:51 ` [Qemu-devel] [PULL 0/1] " Peter Maydell

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.