Skip to contentSkip to conversation

connector - documentation: close opened file descriptor

PATCH New Valentin Ilie 1 participant 1 message Sep 17, 2014 Documentation

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 connector - documentation: close opened file descriptor

For the logging process, we use either a file or stdout.

In the case of a file, we need to fix that by calling fclose at the right time.
In the case we end up calling fclose to stdout, we will not impact the program because we do it at its very end.

---
 Documentation/connector/ucon.c | 1 +
 1 file changed, 1 insertion(+)
Documentation/connector/ucon.c +1 -0
index 8a4da64..f9d785b 100644
@@ -246,5 +246,6 @@ int main(int argc, char *argv[])
 	}
 
 	close(s);
+	fclose(out);
 	return 0;
 }
Signature · 1 line
1.9.1