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: Michael S. Tsirkin
Subject: Re: [Qemu-devel] [PATCH v2 04/11] virtio-gpu: move iov free to virtio_gpu_cleanup_mapping_iov
Date: Tue, 29 Sep 2015 16:13:08 +0300

On Fri, Sep 25, 2015 at 03:14:59PM +0200, Gerd Hoffmann wrote:
> 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
> 


Makes sense. Pls include this info in the commit log.



reply via email to

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