[mutter/gnome-3-22] MetaRendererNative: don't call drmModeGetResources()
- From: Rui Matos <rtcm src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [mutter/gnome-3-22] MetaRendererNative: don't call drmModeGetResources()
- Date: Tue, 18 Oct 2016 12:25:40 +0000 (UTC)
commit 6567e235a483608228a936d339da7e758fe9dab5
Author: Rui Matos <tiagomatos gmail com>
Date: Fri Oct 14 18:24:34 2016 +0200
MetaRendererNative: don't call drmModeGetResources()
There's no need to call this and we were leaking the returned memory.
https://bugzilla.gnome.org/show_bug.cgi?id=773116
src/backends/native/meta-renderer-native.c | 18 +-----------------
1 files changed, 1 insertions(+), 17 deletions(-)
---
diff --git a/src/backends/native/meta-renderer-native.c b/src/backends/native/meta-renderer-native.c
index 2093e09..b4c93c4 100644
--- a/src/backends/native/meta-renderer-native.c
+++ b/src/backends/native/meta-renderer-native.c
@@ -1235,7 +1235,6 @@ meta_renderer_native_initable_init (GInitable *initable,
GError **error)
{
MetaRendererNative *renderer_native = META_RENDERER_NATIVE (initable);
- drmModeRes *resources;
renderer_native->gbm = gbm_create_device (renderer_native->kms_fd);
if (!renderer_native->gbm)
@@ -1243,25 +1242,10 @@ meta_renderer_native_initable_init (GInitable *initable,
g_set_error (error, G_IO_ERROR,
G_IO_ERROR_FAILED,
"Failed to create gbm device");
- goto err;
- }
-
- resources = drmModeGetResources (renderer_native->kms_fd);
- if (!resources)
- {
- g_set_error (error, G_IO_ERROR,
- G_IO_ERROR_FAILED,
- "drmModeGetResources failed");
- goto err_resources;
+ return FALSE;
}
return TRUE;
-
-err_resources:
- g_clear_pointer (&renderer_native->gbm, gbm_device_destroy);
-
-err:
- return FALSE;
}
static void
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]