summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/tdm_drm_display.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/tdm_drm_display.c b/src/tdm_drm_display.c
index fe4d75a..d9304eb 100644
--- a/src/tdm_drm_display.c
+++ b/src/tdm_drm_display.c
@@ -851,6 +851,7 @@ tdm_drm_display_create_output_list(tdm_drm_data *drm_data)
if (crtc_id == 0) {
TDM_ERR("no possible crtc");
drmModeFreeConnector(connector);
+ drmModeFreeEncoder(encoder);
ret = TDM_ERROR_OPERATION_FAILED;
goto failed_create;
}
@@ -1533,10 +1534,14 @@ drm_layer_get_capability(tdm_layer *layer, tdm_caps_layer *caps)
drmModePropertyPtr prop = drmModeGetProperty(drm_data->drm_fd, props->props[i]);
if (!prop)
continue;
- if (!strncmp(prop->name, "type", TDM_NAME_LEN))
+ if (!strncmp(prop->name, "type", TDM_NAME_LEN)) {
+ drmModeFreeProperty(prop);
continue;
- if (!strncmp(prop->name, "zpos", TDM_NAME_LEN))
+ }
+ if (!strncmp(prop->name, "zpos", TDM_NAME_LEN)) {
+ drmModeFreeProperty(prop);
continue;
+ }
snprintf(caps->props[i].name, TDM_NAME_LEN, "%s", prop->name);
caps->props[i].id = props->props[i];
caps->prop_count++;