summaryrefslogtreecommitdiff
path: root/src/ntp.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/ntp.c')
-rw-r--r--src/ntp.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/ntp.c b/src/ntp.c
index 32ae714d..fa4f6244 100644
--- a/src/ntp.c
+++ b/src/ntp.c
@@ -266,7 +266,7 @@ static void start_ntp(const char *server)
if (channel_watch > 0)
return;
- fd = socket(PF_INET, SOCK_DGRAM, 0);
+ fd = socket(PF_INET, SOCK_DGRAM | SOCK_CLOEXEC, 0);
if (fd < 0) {
connman_error("Failed to open time server socket");
return;