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

Re: [Libguestfs] [nbdkit] leak? (#1)



On Thu, May 29, 2014 at 10:39:49AM -0700, knokknok wrote:
> Not clear to me if the following malloc is freed within lzma or if this is a leak...
> https://github.com/libguestfs/nbdkit/blob/master/plugins/xz/xzfile.c#L454

Sorry for the late reply - we don't use github for problem tracking so
no one was looking at this.

In this function (xzfile_read_block) the 'data' pointer is returned to
the caller, who must free it.  The calling code is a bit complicated
because it puts the 'data' pointer into a cache, where it will be
freed when the cache is deleted or the block in the cache expires.  So
I believe this is safe, but if you think otherwise, then let us know
on the mailing list (libguestfs redhat com).

Rich.

-- 
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
Read my programming and virtualization blog: http://rwmj.wordpress.com
virt-top is 'top' for virtual machines.  Tiny program with many
powerful monitoring features, net stats, disk stats, logging, etc.
http://people.redhat.com/~rjones/virt-top


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