We call the free function as soon as practical to allow the now-following
logic to return at its leisure.
---
tools/xsetwacom.c | 3 +--
1 files changed, 1 insertions(+), 2 deletions(-)
diff --git a/tools/xsetwacom.c b/tools/xsetwacom.c
index 5527a77..310fb30 100644
--- a/tools/xsetwacom.c
+++ b/tools/xsetwacom.c
@@ -2014,7 +2014,6 @@ static void set_output_xrandr(Display *dpy, XDevice *dev,
param_t *param, int ar
output_name = argv[0];
res = XRRGetScreenResources(dpy, DefaultRootWindow(dpy));
-
for (i = 0; i < res->noutput && !found; i++)
{
output_info = XRRGetOutputInfo(dpy, res, res->outputs[i]);
@@ -2035,6 +2034,7 @@ static void set_output_xrandr(Display *dpy, XDevice *dev,
param_t *param, int ar
break;
}
}
+ XRRFreeScreenResources(res);
/* crtc holds our screen info, need to compare to actual screen size */
if (found)
@@ -2046,7 +2046,6 @@ static void set_output_xrandr(Display *dpy, XDevice *dev,
param_t *param, int ar
printf("Unable to find output '%s'. "
"Output may not be connected.\n", output_name);
- XRRFreeScreenResources(res);
}
/**
--
1.7.5.2
------------------------------------------------------------------------------
uberSVN's rich system and user administration capabilities and model
configuration take the hassle out of deploying and managing Subversion and
the tools developers use with it. Learn more about uberSVN and get a free
download at: http://p.sf.net/sfu/wandisco-dev2dev
_______________________________________________
Linuxwacom-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/linuxwacom-devel