xf86-video-intel: src/drmmode_display.c

Keith Packard keithp at kemper.freedesktop.org
Thu Sep 17 18:13:17 PDT 2009


 src/drmmode_display.c |    6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

New commits:
commit ee9ad853574e3ee1a210db6207b84ecd466e08ee
Author: Keith Packard <keithp at keithp.com>
Date:   Thu Sep 17 17:57:40 2009 -0700

    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 at keithp.com>

diff --git a/src/drmmode_display.c b/src/drmmode_display.c
index 04ba350..cf88cd8 100644
--- a/src/drmmode_display.c
+++ b/src/drmmode_display.c
@@ -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);


More information about the xorg-commit mailing list