Re: [Spice-devel] [vdagent-win PATCH] Remove small memory leak in log_version

2017-07-21 Thread Christophe Fergeau
On Fri, Jul 21, 2017 at 09:58:59AM -0400, Frediano Ziglio wrote: > > > > > > > > #define LOG_ROLL_SIZE (1024 * 1024) > > > > > > @@ -80,7 +81,6 @@ void log_version() > > > { > > > DWORD handle; > > > TCHAR module_fname[MAX_PATH]; > > > -TCHAR* info_buf = NULL; > > > > > >

Re: [Spice-devel] [vdagent-win PATCH] Remove small memory leak in log_version

2017-07-21 Thread Frediano Ziglio
> > On Fri, Jul 21, 2017 at 02:01:12PM +0100, Frediano Ziglio wrote: > > The outer info_buf pointer were always NULL (the internal one > > is another variable). > > I'd expand a bit on what the leak is, at first I thought the short log > and long log were unrelated. > "log_version() declares 2 in

Re: [Spice-devel] [vdagent-win PATCH] Remove small memory leak in log_version

2017-07-21 Thread Christophe Fergeau
On Fri, Jul 21, 2017 at 02:01:12PM +0100, Frediano Ziglio wrote: > The outer info_buf pointer were always NULL (the internal one > is another variable). I'd expand a bit on what the leak is, at first I thought the short log and long log were unrelated. "log_version() declares 2 info_buf variables,

[Spice-devel] [vdagent-win PATCH] Remove small memory leak in log_version

2017-07-21 Thread Frediano Ziglio
The outer info_buf pointer were always NULL (the internal one is another variable). Signed-off-by: Frediano Ziglio --- OT: wonder why not using FindResource/LoadResource and so on instead of having to use the module file. --- common/vdlog.cpp | 9 - 1 file changed, 4 insertions(+), 5 del