summaryrefslogtreecommitdiff
blob: 5da61aee734318db3637d7d7921522ddb77bd5f4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
diff -u linux-ftpd-ssl-0.17.18+0.3/ftpd/ftpd.c linux-ftpd-ssl-0.17.18+0.3/ftpd/ftpd.c
--- linux-ftpd-ssl-0.17.18+0.3/ftpd/ftpd.c
+++ linux-ftpd-ssl-0.17.18+0.3/ftpd/ftpd.c
@@ -1729,7 +1729,7 @@
 static FILE * dataconn(const char *name, off_t size, const char *mode, int stou)
 {
 	char sizebuf[32];
-	FILE *file;
+	FILE *file = NULL;
 	int retry = 0, tos;
 
 	file_size = size;
@@ -1822,7 +1822,10 @@
 				    ERR_error_string(ERR_get_error(),NULL));
 			perror_reply(425, errbuf);
 			/* abort time methinks ... */
-			fclose(file);
+			if(file != NULL){
+				fclose(file);
+				file = NULL;
+			}
 			return NULL;
 		    } else {
 			if (ssl_debug_flag) {