[2025-06-01 10:15:01+0000] Laurent Bercot:
>
> Nice suggestion, thanks! I pushed something similar reusing the dryrun
>variable, and -N because I like to reserve -t for timeouts. Please test
>and check that it's working for you.
Works here!
>
>>+ script_free(script, scriptlen, envmatch, envmatchlen) ;
>
> That freeing is unnecessary because the program exits right away.
Right just tend to do it anyway on contribs due to analyzers like valgrind.
> The script_free function only exists because SIGHUP will make mdevd
>reload its configuration file, so the heap allocations need to be freed
>before new ones are performed. Normally I'd do that in the bottom half
>of the SIGHUP handler, but mdevd also doubles as a "use as little static
>and heap data as possible" experiment, so the script itself lives in
>the stack, which is why you see the freeing function invoked in the
>outer loop instead.
>
>--
> Laurent
>
Received on Sun Jun 01 2025 - 16:08:26 CEST