drmModePropertyPtr prop = drmModeGetProperty(vc4_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++;