Re: bug#31439: [PATCH] fts: avoid a memory leak edge case

2018-05-14 Thread Pádraig Brady
On 14/05/18 01:28, Bruno Haible wrote: > Kamil Dudka wrote: >> Why are you removing fflush (stdout) from the test without any explanation? > > Yes, fflush(stdout) statements are extremely important if you want to > understand/debug test failures on native Windows. Oops, I wasn't aware of windows

Re: bug#31439: [PATCH] fts: avoid a memory leak edge case

2018-05-14 Thread Bruno Haible
Kamil Dudka wrote: > Why are you removing fflush (stdout) from the test without any explanation? Yes, fflush(stdout) statements are extremely important if you want to understand/debug test failures on native Windows. Bruno

Re: bug#31439: [PATCH] fts: avoid a memory leak edge case

2018-05-14 Thread Kamil Dudka
On Monday, May 14, 2018 3:51:02 AM CEST Pádraig Brady wrote: > @@ -122,9 +139,10 @@ main (void) > perror_exit (base, 6); >while ((e = fts_read (ftsp))) > needles_seen += strcmp (e->fts_name, "needle") == 0; > - fflush (stdout); >if (errno) > perror_exit ("fts_read", 7); > +

[PATCH] fts: avoid a memory leak edge case

2018-05-13 Thread Pádraig Brady
ee the actual root level entries. Yes valgrind indicates that fts_level is uninitialized if you fts_close() right after fts_open(). The attached should fix it up. thanks! Pádraig From 71b6724aa2e2843da7b73151d13c678452a59c7f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?P=C3=A1draig=20Brady?= Date: Sun