( )⚙ D11928 procutil: avoid an uninitialized variable usage on tempfile exception

This is an archive of the discontinued Mercurial Phabricator instance.

procutil: avoid an uninitialized variable usage on tempfile exception
ClosedPublic

Authored by mharbison72 on Dec 15 2021, 3:47 PM.

Details

Summary

If pycompat.unnamedtempfile() raises an exception, it would have called
stdin.close() in the finally block without it being initialized first.

Diff Detail

Repository
rHG Mercurial
Branch
default
Lint
No Linters Available
Unit
No Unit Test Coverage