bug#72446: [PATCH] stat: Fix memleak

2024-08-03 Thread Pádraig Brady
tag 72446 notabug close 72446 stop On 03/08/2024 17:10, Dmitry Chestnykh wrote: format and format2 strings are allocated by `malloc()` inside `xasprintf` so the memory should be freed * src/stat.c: Call `free()` on `format` and `format2` --- src/stat.c | 2 ++ 1 file changed, 2 insertions(+)

bug#72446: [PATCH] stat: Fix memleak

2024-08-03 Thread Dmitry Chestnykh
format and format2 strings are allocated by `malloc()` inside `xasprintf` so the memory should be freed * src/stat.c: Call `free()` on `format` and `format2` --- src/stat.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/stat.c b/src/stat.c index 1513abfaa..47f3b5052 100644 --- a/src/st

bug#72445: shuf with both input-range and head-count biased

2024-08-03 Thread Daniel Carpenter
The above options allow me to use shuf to efficiently simulate a dice roll, but there is a clear bias when I do so, for example: $ for i in {1..1}; do shuf --input-range=1-6 --head-count=1; done | sort | uniq --count 1730 1 1411 2 1882 3 1809 4 1520 5 1648 6 Using seq instea