[ros-dev] [ros-diffs] [hbelusca] 74735: [NTOS]: Better clean up behind ourselves on failure paths (aka. closing handles). These functions are clearly not written with correct cleanup-on-failure concept in mind...

Thomas Faber thomas.faber at reactos.org
Fri Jun 2 06:20:31 UTC 2017


On 2017-06-01 20:37, hbelusca at svn.reactos.org wrote:
> +    if (!NT_SUCCESS(Status))
> +    {
> +        /* We failed, close all the opened handles and return */
> +        // NtClose(KeyHandle);

Please don't add commented-out code.
What is that supposed to even mean? "I was too lazy to test this"? "All
the other code depends on this leak"? "I think it would look prettier
here"?



More information about the Ros-dev mailing list