Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix broken NULL check when closing NV file. #16

Closed
flihp opened this issue Aug 17, 2018 · 1 comment
Closed

Fix broken NULL check when closing NV file. #16

flihp opened this issue Aug 17, 2018 · 1 comment

Comments

@flihp
Copy link
Contributor

flihp commented Aug 17, 2018

The indentation in this block of code is misleading: https://github.com/Microsoft/ms-tpm-20-ref/blob/master/TPMCmd/Platform/src/NVMem.c#L208

The call to 'fclose' immediately follows a conditional and is indented in such a way as to lead the reader to believe it is within the scope of the conditional. The conditional however is immediately followed by a ';' on the same line which makes it a no-op and causes the call to 'fclose' to happen regardless of the result of the test. Removing this ';' will get you the intended behavior.

Apologies for not sending a patch but I'm still barred from doing so on account of the CCLA.

dmcilvaney added a commit to dmcilvaney/ms-tpm-20-ref that referenced this issue Sep 14, 2018
dmcilvaney pushed a commit to dmcilvaney/ms-tpm-20-ref that referenced this issue Oct 12, 2018
Update build instructions for new u-boot repository
@amarochk
Copy link
Contributor

Had been fixed as part of another patch.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants