mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-01-06 02:40:17 +01:00
core/dhcp: use gs_free_error in NMDhcpDhcpcd's ip4_start()
It just seems less error prone. Use the cleanup attribute.
This commit is contained in:
parent
fd50323232
commit
63664719be
1 changed files with 1 additions and 2 deletions
|
|
@ -70,7 +70,7 @@ ip4_start(NMDhcpClient *client, GError **error)
|
|||
const NMDhcpClientConfig *client_config;
|
||||
gs_unref_ptrarray GPtrArray *argv = NULL;
|
||||
pid_t pid;
|
||||
GError *local = NULL;
|
||||
gs_free_error GError *local = NULL;
|
||||
gs_free char *cmd_str = NULL;
|
||||
const char *dhcpcd_path;
|
||||
|
||||
|
|
@ -143,7 +143,6 @@ ip4_start(NMDhcpClient *client, GError **error)
|
|||
NM_UTILS_ERROR_UNKNOWN,
|
||||
"dhcpcd failed to start: %s",
|
||||
local->message);
|
||||
g_error_free(local);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue