diff options
author | Georges Basile Stavracas Neto <georges.stavracas@gmail.com> | 2018-03-17 21:42:37 -0300 |
---|---|---|
committer | Jonas Ã…dahl <jadahl@gmail.com> | 2018-04-16 16:30:21 +0200 |
commit | 7fdac6d3101cdb5b6e6f032dba533ed4982b8c47 (patch) | |
tree | 7455d59ccecd1c326e7c90159cebeafae4d80752 /src | |
parent | f6cd87734d01d911817ccabe284ae316cba19311 (diff) | |
download | mutter-7fdac6d3101cdb5b6e6f032dba533ed4982b8c47.tar.gz |
monitor-manager-kms: Use g_autoptr for error
A minor code cleanup.
Diffstat (limited to 'src')
-rw-r--r-- | src/backends/native/meta-monitor-manager-kms.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/backends/native/meta-monitor-manager-kms.c b/src/backends/native/meta-monitor-manager-kms.c index 2a14308c4..1a8be0855 100644 --- a/src/backends/native/meta-monitor-manager-kms.c +++ b/src/backends/native/meta-monitor-manager-kms.c @@ -674,7 +674,7 @@ meta_monitor_manager_kms_initable_init (GInitable *initable, gpu_paths = get_gpu_paths (manager_kms, GPU_TYPE_SECONDARY, primary_gpu_path); for (l = gpu_paths; l; l = l->next) { - GError *secondary_error = NULL; + g_autoptr (GError) secondary_error = NULL; char *gpu_path = l->data; MetaGpuKms *gpu_kms; @@ -683,7 +683,6 @@ meta_monitor_manager_kms_initable_init (GInitable *initable, { g_warning ("Failed to open secondary gpu '%s': %s", gpu_path, secondary_error->message); - g_error_free (secondary_error); } meta_monitor_manager_add_gpu (META_MONITOR_MANAGER (manager_kms), |