From: Anthony Minessale Date: Wed, 3 Apr 2013 01:07:10 +0000 (-0500) Subject: only fclose open pointer X-Git-Tag: v1.5.1~315 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=437eedfadf1b75dd71ecebfc828594e225e39367;p=thirdparty%2Ffreeswitch.git only fclose open pointer --- diff --git a/src/switch_core_cert.c b/src/switch_core_cert.c index 5a56746fa1..278e000bf6 100644 --- a/src/switch_core_cert.c +++ b/src/switch_core_cert.c @@ -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);