The contents of volname would be leaked if the function were
to be passed an invalid pooltype by the caller.
Make sure the memory is released instead.
---
Initializing volname to NULL is strictly speaking not
necessary, but I like it better that way :)
src/storage/storage_util.c | 12 +--
On 04/05/2017 12:28 PM, Andrea Bolognani wrote:
> The contents of volname would be leaked if the function were
> to be passed an invalid pooltype by the caller.
>
> Make sure the memory is released instead.
> ---
> Initializing volname to NULL is strictly speaking not
> necessary, but I like it
On Wed, Apr 05, 2017 at 12:40:09 -0400, John Ferlan wrote:
>
>
> On 04/05/2017 12:28 PM, Andrea Bolognani wrote:
> > The contents of volname would be leaked if the function were
> > to be passed an invalid pooltype by the caller.
> >
> > Make sure the memory is released instead.
> > ---
> > Init
On Thu, 2017-04-06 at 08:29 +0200, Peter Krempa wrote:
> > If you went with this option, then VIR_STEAL_PTR(src->dir, volname); and
> > VIR_STEAL_PTR(src->name, volname); instead of inlining.
>
> I vote for this.
>
> > And as some would say the comment is "obvious".
>
> And for this.
Me too. I