network: Use g_autoptr for GError handling
This commit is contained in:
parent
072d5daf5c
commit
01190db349
18 changed files with 73 additions and 135 deletions
|
@ -609,7 +609,7 @@ net_device_ethernet_class_init (NetDeviceEthernetClass *klass)
|
|||
static void
|
||||
net_device_ethernet_init (NetDeviceEthernet *device)
|
||||
{
|
||||
GError *error = NULL;
|
||||
g_autoptr(GError) error = NULL;
|
||||
|
||||
device->builder = gtk_builder_new ();
|
||||
gtk_builder_add_from_resource (device->builder,
|
||||
|
@ -617,7 +617,6 @@ net_device_ethernet_init (NetDeviceEthernet *device)
|
|||
&error);
|
||||
if (error != NULL) {
|
||||
g_warning ("Could not load interface file: %s", error->message);
|
||||
g_error_free (error);
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue