Hello! In file source3/torture/vfstest.c in function process_file() leak file descriptor when we process file (not a standart input). I made a trivial patch, but not sure I fix it gracefully: may be condition should be file != stdin? (it's probably more readable.) Also, while I'm here, i found then this condition may be wrong in some cases: if (*filename == '-') { file = stdin; Its only check first symbol of string. What will be if file has name starts from minus sign? File systems allow such files, but may be you program not (for example if you not use GNU getopt()).
Created attachment 4184 [details] Fix for resource leak in source3/torture/vfstest.c Proposal patch.
Yes, the "file != stdin" would be more reliable. To fix the other problem you pointed out, you might want to use strcmp(filename, "-") == 0 instead of *filename == '-' Volker
(In reply to comment #2) > Yes, the "file != stdin" would be more reliable. I update patch.
Created attachment 4202 [details] Proper fix for resource leak in source3/torture/vfstest.c
Pushed with ecd1fe2, thanks! Volker