qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH v2 04/11] virtio-gpu: move iov free to virtio_gp


From: Gerd Hoffmann
Subject: Re: [Qemu-devel] [PATCH v2 04/11] virtio-gpu: move iov free to virtio_gpu_cleanup_mapping_iov
Date: Fri, 25 Sep 2015 15:14:59 +0200

On Do, 2015-09-24 at 13:16 +0300, Michael S. Tsirkin wrote:
> On Thu, Sep 24, 2015 at 11:04:55AM +0200, Gerd Hoffmann wrote:
> > Signed-off-by: Gerd Hoffmann <address@hidden>
> 
> It's easy to see this is what the patch does.  But why?  Some
> explanation in the commit log about why it's done, as opposed to what is
> done, would be better.

It's for symmetry reasons: virtio_gpu_create_mapping_iov() allocates it
so virtio_gpu_cleanup_mapping_iov() should free it, otherwise it's easy
to miss a free() needed and leak memory.

cheers,
  Gerd






reply via email to

[Prev in Thread] Current Thread [Next in Thread]