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
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.