summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorPaulo Zanoni <paulo.r.zanoni@intel.com>2014-08-05 18:44:47 -0300
committerPaulo Zanoni <paulo.r.zanoni@intel.com>2014-08-07 15:41:02 -0300
commit61920c68d847dcc920fff27f857e03debc76a9a4 (patch)
treea5600d8d9abab01f26433842dae500d20dd3f8e4 /lib
parentbfb5a757751d6f8e6f7ed02f6cb76d006cd0e990 (diff)
igt_kms: don't get drmModeRes just to free it later
Stress testing malloc is not our goal :) Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Diffstat (limited to 'lib')
-rw-r--r--lib/igt_kms.c12
1 files changed, 0 insertions, 12 deletions
diff --git a/lib/igt_kms.c b/lib/igt_kms.c
index 740b5ddb..8ab729b7 100644
--- a/lib/igt_kms.c
+++ b/lib/igt_kms.c
@@ -276,21 +276,11 @@ void igt_set_vt_graphics_mode(void)
int kmstest_get_connector_default_mode(int drm_fd, drmModeConnector *connector,
drmModeModeInfo *mode)
{
- drmModeRes *resources;
int i;
- resources = drmModeGetResources(drm_fd);
- if (!resources) {
- perror("drmModeGetResources failed");
-
- return -1;
- }
-
if (!connector->count_modes) {
fprintf(stderr, "no modes for connector %d\n",
connector->connector_id);
- drmModeFreeResources(resources);
-
return -1;
}
@@ -303,8 +293,6 @@ int kmstest_get_connector_default_mode(int drm_fd, drmModeConnector *connector,
}
}
- drmModeFreeResources(resources);
-
return 0;
}