Re: [libvirt] [PATCHv2] snapshot: fix memory leak on error

2012-04-05 Thread Daniel Veillard
On Thu, Apr 05, 2012 at 04:01:03PM -0600, Eric Blake wrote: > Leak introduced in commit 0436d32. If we allocate an actions array, > but fail early enough to never consume it with the qemu monitor > transaction call, we leaked memory. > > But our semantics of making the transaction command free th

[libvirt] [PATCHv2] snapshot: fix memory leak on error

2012-04-05 Thread Eric Blake
Leak introduced in commit 0436d32. If we allocate an actions array, but fail early enough to never consume it with the qemu monitor transaction call, we leaked memory. But our semantics of making the transaction command free the caller's memory is awkward; avoiding the memory leak requires making