Make sure DRM output properties are freed after we're done with them.

drmmode_output_get_modes was fetching output properties but only
freeing some of them.

Signed-off-by: Keith Packard <keithp@keithp.com>
This commit is contained in:
Keith Packard 2009-09-17 17:57:40 -07:00
parent b8c5c996e8
commit ee9ad85357
1 changed files with 5 additions and 1 deletions

View File

@ -793,8 +793,12 @@ drmmode_output_get_modes(xf86OutputPtr output)
/* look for an EDID property */
for (i = 0; i < koutput->count_props; i++) {
props = drmModeGetProperty(drmmode->fd, koutput->props[i]);
if (!props || !(props->flags & DRM_MODE_PROP_BLOB))
if (!props)
continue;
if (!(props->flags & DRM_MODE_PROP_BLOB)) {
drmModeFreeProperty(props);
continue;
}
if (!strcmp(props->name, "EDID")) {
drmModeFreePropertyBlob(drmmode_output->edid_blob);