only fclose open pointer

This commit is contained in:
Anthony Minessale 2013-04-02 20:07:10 -05:00
parent 69c3c7d8e2
commit 437eedfadf

View File

@ -260,15 +260,13 @@ SWITCH_DECLARE(int) switch_core_gen_certs(const char *prefix)
} else {
if ((fp = fopen(pvt, "w"))) {
PEM_write_PrivateKey(fp, pkey, NULL, NULL, 0, NULL, NULL);
fclose(fp);
}
fclose(fp);
if ((fp = fopen(rsa, "w"))) {
PEM_write_X509(fp, x509);
fclose(fp);
}
fclose(fp);
}
X509_free(x509);