diff options
author | Nick Mathewson <nickm@torproject.org> | 2014-04-19 12:47:58 -0400 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2014-04-19 12:47:58 -0400 |
commit | 5670e38efb8529d3439b8a160e9f19c4147e01ad (patch) | |
tree | cb8b3ba2b13514f5bc3187980529aee97cddca76 /src/tools | |
parent | 9c9e07963dddff6e11330e9dc8ad7a6d37da4aa4 (diff) | |
download | tor-5670e38efb8529d3439b8a160e9f19c4147e01ad.tar.gz tor-5670e38efb8529d3439b8a160e9f19c4147e01ad.zip |
scan-build: close stdio FILEs on error in tor-gencert
This is harmless, since tor-gencert exits right afterwards, but it's
best to clean up after ourselves.
Diffstat (limited to 'src/tools')
-rw-r--r-- | src/tools/tor-gencert.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/tools/tor-gencert.c b/src/tools/tor-gencert.c index d0c30b8b02..e799df5cad 100644 --- a/src/tools/tor-gencert.c +++ b/src/tools/tor-gencert.c @@ -302,6 +302,7 @@ load_identity_key(void) if (!identity_key) { log_err(LD_GENERAL, "Couldn't read identity key from %s", identity_key_file); + fclose(f); return 1; } fclose(f); @@ -322,6 +323,7 @@ load_signing_key(void) } if (!(signing_key = PEM_read_PrivateKey(f, NULL, NULL, NULL))) { log_err(LD_GENERAL, "Couldn't read siging key from %s", signing_key_file); + fclose(f); return 1; } fclose(f); |