Skip to content

Commit

Permalink
fixes issue #110 (#119)
Browse files Browse the repository at this point in the history
Summary:
Fixes #110 Solution: Add print limitation.

#114 #116 #117  Seems to be false alarms.
However there is a possible memory leak in
https://github.com/facebook/openbmc/blob/de522bcdf9ea26e52a81b9a4a69326774bb87a07/common/recipes-core/fw-util/files/tpm2.cpp#L45
Opening pipeline should be closed at the end of process.
Pull Request resolved: #119

Reviewed By: benwei13

Pulled By: williamspatrick

fbshipit-source-id: 6f08ce26f4
  • Loading branch information
leila.lin authored and facebook-github-bot committed May 26, 2020
1 parent 23dd6cb commit 40bb49e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion common/recipes-core/fw-util/files/system.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ string System::version()
char vers[128] = "NA";
FILE *fp = fopen("/etc/issue", "r");
if (fp) {
if (fscanf(fp, "OpenBMC Release %s\n", vers) == 1) {
if (fscanf(fp, "OpenBMC Release %127s\n", vers) == 1) {
ret = vers;
}
fclose(fp);
Expand Down
2 changes: 1 addition & 1 deletion common/recipes-core/fw-util/files/tpm2.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ int tpm2_get_ver(char *ver, Tpm2Component *tpm2) {
break;
}
}
fclose(fp);
pclose(fp);

if (match != true) {
return FW_STATUS_FAILURE;
Expand Down

0 comments on commit 40bb49e

Please sign in to comment.