[PATCH xinput] Fix XRRCrtcInfo memory leaks
Peter Hutterer
peter.hutterer at who-t.net
Wed Feb 8 06:05:50 PST 2012
Reported-by: Aaron Plattner <aplattner at nvidia.com>
Signed-off-by: Peter Hutterer <peter.hutterer at who-t.net>
---
src/transform.c | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/src/transform.c b/src/transform.c
index cffc3af..2440b64 100644
--- a/src/transform.c
+++ b/src/transform.c
@@ -158,6 +158,7 @@ map_output_xrandr(Display *dpy, int deviceid, const char *output_name)
found = 1;
break;
}
+ XRRFreeCrtcInfo(crtc_info);
}
/* crtc holds our screen info, need to compare to actual screen size */
@@ -168,6 +169,7 @@ map_output_xrandr(Display *dpy, int deviceid, const char *output_name)
set_transformation_matrix(dpy, &m, crtc_info->x, crtc_info->y,
crtc_info->width, crtc_info->height);
rc = apply_matrix(dpy, deviceid, &m);
+ XRRFreeCrtcInfo(crtc_info);
} else
printf("Unable to find output '%s'. "
"Output may not be connected.\n", output_name);
--
1.7.7.5
More information about the xorg-devel
mailing list