Skip to content

helpers: Fix use-after-free closing standard output

Simon McVittie requested to merge wip/smcv/fclose-regression into main

In these two helpers, original_stdout is automatically freed on exit from its scope, so we must not close it in a way that leaves a dangling pointer to the freed object.

Fixes: 44df5dfa "helpers: Warn if closing stdout fails"

Merge request reports