diff --git a/src/dns/nm-dns-manager.c b/src/dns/nm-dns-manager.c index 84c6b57746..6d4000b637 100644 --- a/src/dns/nm-dns-manager.c +++ b/src/dns/nm-dns-manager.c @@ -380,12 +380,11 @@ run_netconfig (NMDnsManager *self, GError **error, gint *stdin_fd) static void write_to_netconfig (NMDnsManager *self, gint fd, const char *key, const char *value) { - char *str; + gs_free char *str = NULL; str = g_strdup_printf ("%s='%s'\n", key, value); - _LOGD ("writing to netconfig: %s", str); - write (fd, str, strlen (str)); - g_free (str); + _LOGD ("writing to netconfig: %s='%s'", key, value); + (void) write (fd, str, strlen (str)); } static SpawnResult diff --git a/src/settings/plugins/ifnet/nms-ifnet-connection-parser.c b/src/settings/plugins/ifnet/nms-ifnet-connection-parser.c index ed0a757fdb..ee3092d6c3 100644 --- a/src/settings/plugins/ifnet/nms-ifnet-connection-parser.c +++ b/src/settings/plugins/ifnet/nms-ifnet-connection-parser.c @@ -2597,7 +2597,7 @@ ifnet_update_parsers_by_connection (NMConnection *connection, gboolean success = FALSE; const char *type; gboolean no_8021x = FALSE; - gboolean wired = FALSE, pppoe = TRUE; + gboolean wired = FALSE; const char *new_name = NULL; if (!ifnet_can_write_connection (connection, error)) @@ -2630,7 +2630,6 @@ ifnet_update_parsers_by_connection (NMConnection *connection, s_pppoe = nm_connection_get_setting_pppoe (connection); if (!write_pppoe_setting (conn_name, s_pppoe)) goto out; - pppoe = TRUE; wired = TRUE; no_8021x = TRUE; } else {