From afcd268ea7b1149fbfb66bce4eca659b675da0a2 Mon Sep 17 00:00:00 2001 From: Michael Biebl Date: Tue, 12 Dec 2017 15:53:07 +0100 Subject: New upstream version 1.10.2 --- src/nm-core-utils.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/nm-core-utils.c') diff --git a/src/nm-core-utils.c b/src/nm-core-utils.c index a8ff3513..40a0c352 100644 --- a/src/nm-core-utils.c +++ b/src/nm-core-utils.c @@ -2835,13 +2835,13 @@ nm_utils_fd_get_contents (int fd, if (fd_keeper >= 0) fd2 = nm_steal_fd (&fd_keeper); else { - fd2 = dup (fd); + fd2 = fcntl (fd, F_DUPFD_CLOEXEC, 0); if (fd2 < 0) return _get_contents_error (error, 0, "error during dup"); } if (!(f = fdopen (fd2, "r"))) { - close (fd2); + nm_close (fd2); return _get_contents_error (error, 0, "failure during fdopen"); } @@ -4119,7 +4119,7 @@ nm_utils_file_set_contents (const gchar *filename, if (errsv == EINTR) continue; - close (fd); + nm_close (fd); unlink (tmp_name); g_set_error (error, @@ -4148,7 +4148,7 @@ nm_utils_file_set_contents (const gchar *filename, && fsync (fd) != 0) { errsv = errno; - close (fd); + nm_close (fd); unlink (tmp_name); g_set_error (error, @@ -4160,7 +4160,7 @@ nm_utils_file_set_contents (const gchar *filename, return FALSE; } - close (fd); + nm_close (fd); if (rename (tmp_name, filename)) { errsv = errno; -- cgit 1.3.0-6-gf8a5 From 50f6b47074e01dffb8dc536c0a20961dcf28ae9b Mon Sep 17 00:00:00 2001 From: Michael Biebl Date: Wed, 7 Feb 2018 02:39:23 +0100 Subject: New upstream version 1.10.4 --- src/nm-core-utils.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'src/nm-core-utils.c') diff --git a/src/nm-core-utils.c b/src/nm-core-utils.c index 40a0c352..f6b33a14 100644 --- a/src/nm-core-utils.c +++ b/src/nm-core-utils.c @@ -1960,8 +1960,7 @@ nm_utils_resolve_conf_parse (int addr_family, gsize i_tokens; tokens = nm_utils_strsplit_set (s, " \t"); - nm_assert (tokens); - for (i_tokens = 0; tokens[i_tokens]; i_tokens++) { + for (i_tokens = 0; tokens && tokens[i_tokens]; i_tokens++) { gs_free char *t = g_strstrip (g_strdup (tokens[i_tokens])); if ( _nm_utils_dns_option_validate (t, NULL, NULL, -- cgit 1.3.0-6-gf8a5