From 1448fbc5a3d75d5826972d9121876c2576beeb17 Mon Sep 17 00:00:00 2001 From: Riccardo Magliocchetti Date: Sat, 8 Feb 2014 12:36:09 +0100 Subject: [PATCH] ssl: Fix fd leak on write error Reported by Coverity as CID #1167591 --- core/ssl.c | 1 + 1 file changed, 1 insertion(+) diff --git a/core/ssl.c b/core/ssl.c index 1d7a65fa..197166ca 100644 --- a/core/ssl.c +++ b/core/ssl.c @@ -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; }