if (crtc_id == 0) {
TDM_ERR("no possible crtc");
drmModeFreeConnector(connector);
+ drmModeFreeEncoder(encoder);
ret = TDM_ERROR_OPERATION_FAILED;
goto failed_create;
}
drmModePropertyPtr prop = drmModeGetProperty(nexell_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++;