diff mbox

[1/6] igt_kms: don't get drmModeRes just to free it later

Message ID 1407416947-2282-1-git-send-email-przanoni@gmail.com (mailing list archive)
State New, archived
Headers show

Commit Message

Paulo Zanoni Aug. 7, 2014, 1:09 p.m. UTC
From: Paulo Zanoni <paulo.r.zanoni@intel.com>

Stress testing malloc is not our goal :)

Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
---
 lib/igt_kms.c | 12 ------------
 1 file changed, 12 deletions(-)
diff mbox

Patch

diff --git a/lib/igt_kms.c b/lib/igt_kms.c
index 740b5dd..8ab729b 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;
 }