Re: [PATCH] BUG/MINOR: cli: Fix memory leak

2018-11-07 Thread Willy Tarreau
On Thu, Nov 08, 2018 at 12:54:55AM +0100, William Lallemand wrote: > On Thu, Nov 08, 2018 at 12:47:00AM +0100, Tim Düsterhus wrote: > > Hi > > > > Hi Tim, > > > Am 08.11.18 um 00:32 schrieb Tim Duesterhus: > > > if (!str2listener(path, global.stats_fe, bind_conf, "master-socket", 0, > > > ))

Re: [PATCH] BUG/MINOR: cli: Fix memory leak

2018-11-07 Thread William Lallemand
On Thu, Nov 08, 2018 at 12:47:00AM +0100, Tim Düsterhus wrote: > Hi > Hi Tim, > Am 08.11.18 um 00:32 schrieb Tim Duesterhus: > > if (!str2listener(path, global.stats_fe, bind_conf, "master-socket", 0, > > )) { > > I just notice that `err` in `mworker_cli_sockpair_new` should probably > be

Re: [PATCH] BUG/MINOR: cli: Fix memory leak

2018-11-07 Thread Tim Düsterhus
Hi Am 08.11.18 um 00:32 schrieb Tim Duesterhus: > if (!str2listener(path, global.stats_fe, bind_conf, "master-socket", 0, > )) { I just notice that `err` in `mworker_cli_sockpair_new` should probably be freed as well. Valgrind did not report this, because I did not have any errors. Can

[PATCH] BUG/MINOR: cli: Fix memory leak

2018-11-07 Thread Tim Duesterhus
Valgrind's memcheck reports memory leaks in cli.c, because the out parameter of memprintf is not properly freed: ==31035== 11 bytes in 1 blocks are definitely lost in loss record 16 of 101 ==31035==at 0x4C2DB8F: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so) ==31035==