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

2012-04-06 Thread Eric Blake
On 04/05/2012 10:56 PM, Daniel Veillard wrote: > On Thu, Apr 05, 2012 at 10:24:49PM -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 ou

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

2012-04-05 Thread Daniel Veillard
On Thu, Apr 05, 2012 at 10:24:49PM -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] [PATCHv3] 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