Re: [libvirt] [PATCH] fix memory leak in virCopyLastError

2012-09-14 Thread Daniel P. Berrange
On Fri, Sep 14, 2012 at 03:58:31PM +0800, Daniel Veillard wrote: > On Fri, Sep 14, 2012 at 03:34:29PM +0800, Hu Tao wrote: > > On Fri, Sep 14, 2012 at 03:10:13PM +0800, Daniel Veillard wrote: > > > On Fri, Sep 14, 2012 at 02:24:15PM +0800, Hu Tao wrote: > > > > memset before virResetError will caus

Re: [libvirt] [PATCH] fix memory leak in virCopyLastError

2012-09-14 Thread Daniel P. Berrange
On Fri, Sep 14, 2012 at 02:24:15PM +0800, Hu Tao wrote: > memset before virResetError will cause memory leak. > > virResetError and virCopyError, which calls virResetError, will do > memset properly, so we don't have to worry about it here. > > --- > src/util/virterror.c |2 -- > 1 file chan

Re: [libvirt] [PATCH] fix memory leak in virCopyLastError

2012-09-14 Thread Daniel Veillard
On Fri, Sep 14, 2012 at 03:34:29PM +0800, Hu Tao wrote: > On Fri, Sep 14, 2012 at 03:10:13PM +0800, Daniel Veillard wrote: > > On Fri, Sep 14, 2012 at 02:24:15PM +0800, Hu Tao wrote: > > > memset before virResetError will cause memory leak. > > > > > > virResetError and virCopyError, which calls v

Re: [libvirt] [PATCH] fix memory leak in virCopyLastError

2012-09-14 Thread Hu Tao
On Fri, Sep 14, 2012 at 03:10:13PM +0800, Daniel Veillard wrote: > On Fri, Sep 14, 2012 at 02:24:15PM +0800, Hu Tao wrote: > > memset before virResetError will cause memory leak. > > > > virResetError and virCopyError, which calls virResetError, will do > > memset properly, so we don't have to wor

Re: [libvirt] [PATCH] fix memory leak in virCopyLastError

2012-09-14 Thread Daniel Veillard
On Fri, Sep 14, 2012 at 02:24:15PM +0800, Hu Tao wrote: > memset before virResetError will cause memory leak. > > virResetError and virCopyError, which calls virResetError, will do > memset properly, so we don't have to worry about it here. Disagree, it's a public API, we can't justify behaviou

[libvirt] [PATCH] fix memory leak in virCopyLastError

2012-09-13 Thread Hu Tao
memset before virResetError will cause memory leak. virResetError and virCopyError, which calls virResetError, will do memset properly, so we don't have to worry about it here. --- src/util/virterror.c |2 -- 1 file changed, 2 deletions(-) diff --git a/src/util/virterror.c b/src/util/virter