[PATCH xserver 1/2] modesetting: Fix leak of tile_blob in drmmode_output_destroy
Daniel Martin
consume.noise at gmail.com
Mon Oct 23 08:31:20 UTC 2017
And drmModeFreePropertyBlob() can handle NULL pointers, no need to check
edid_blob.
Signed-off-by: Daniel Martin <consume.noise at gmail.com>
---
hw/xfree86/drivers/modesetting/drmmode_display.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/hw/xfree86/drivers/modesetting/drmmode_display.c b/hw/xfree86/drivers/modesetting/drmmode_display.c
index 4906b0539..2375fa07d 100644
--- a/hw/xfree86/drivers/modesetting/drmmode_display.c
+++ b/hw/xfree86/drivers/modesetting/drmmode_display.c
@@ -1355,8 +1355,9 @@ drmmode_output_destroy(xf86OutputPtr output)
drmmode_output_private_ptr drmmode_output = output->driver_private;
int i;
- if (drmmode_output->edid_blob)
- drmModeFreePropertyBlob(drmmode_output->edid_blob);
+ drmModeFreePropertyBlob(drmmode_output->edid_blob);
+ drmModeFreePropertyBlob(drmmode_output->tile_blob);
+
for (i = 0; i < drmmode_output->num_props; i++) {
drmModeFreeProperty(drmmode_output->props[i].mode_prop);
free(drmmode_output->props[i].atoms);
--
2.13.6
More information about the xorg-devel
mailing list