summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLeo Liu <leo.liu@amd.com>2013-06-14 10:27:20 -0400
committerAlex Deucher <alexdeucher@gmail.com>2013-06-17 12:05:56 -0400
commit3626ab147b6749a355e7d21710447f13b9796c77 (patch)
treeb6af9067b4e618aa4002fe0aa315eb705b5f9aff
parentc0f7d03cb29166c6c00dd6fb698ba3f70c59dbdf (diff)
radeon: fix a memory leak in get_modes() callback.
leak happens when looping xrandr prop. Signed-off-by: Leo Liu <leo.liu@amd.com> Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
-rw-r--r--src/drmmode_display.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/drmmode_display.c b/src/drmmode_display.c
index cd276f35..e342de71 100644
--- a/src/drmmode_display.c
+++ b/src/drmmode_display.c
@@ -837,8 +837,9 @@ drmmode_output_get_modes(xf86OutputPtr output)
drmModeFreePropertyBlob(drmmode_output->edid_blob);
drmmode_output->edid_blob = drmModeGetPropertyBlob(drmmode->fd, koutput->prop_values[i]);
}
- drmModeFreeProperty(props);
}
+ if (props)
+ drmModeFreeProperty(props);
}
if (drmmode_output->edid_blob) {