ssl: Fix fd leak on write error

Reported by Coverity as CID #1167591
This commit is contained in:
Riccardo Magliocchetti
2014-02-08 12:36:09 +01:00
parent b801f839fc
commit 1448fbc5a3
+1
View File
@@ -181,6 +181,7 @@ char *uwsgi_write_pem_to_file(char *name, char *buf, size_t len, char *ext) {
uwsgi_log("unable to write pem data in file %s\n", filename);
uwsgi_error("uwsgi_write_pem_to_file()/write()");
free(filename);
close(fd);
return NULL;
}