Commit 87227e5f authored by Tobias Stoeckmann's avatar Tobias Stoeckmann Committed by Julien Cristau

Fix memory leak on error paths

Introduced in commit a0df3e1c "Avoid out
of boundary accesses on illegal responses"
Signed-off-by: Julien Cristau's avatarJulien Cristau <jcristau@debian.org>
parent 5fb14f7a
......@@ -459,6 +459,7 @@ XRRGetCrtcTransform (Display *dpy,
e = extra;
if (e + rep.pendingNbytesFilter > end) {
XFree (attr);
XFree (extra);
return False;
}
......@@ -468,6 +469,7 @@ XRRGetCrtcTransform (Display *dpy,
for (p = 0; p < rep.pendingNparamsFilter; p++) {
INT32 f;
if (e + 4 > end) {
XFree (attr);
XFree (extra);
return False;
}
......@@ -478,6 +480,7 @@ XRRGetCrtcTransform (Display *dpy,
attr->pendingNparams = rep.pendingNparamsFilter;
if (e + rep.currentNbytesFilter > end) {
XFree (attr);
XFree (extra);
return False;
}
......@@ -487,6 +490,7 @@ XRRGetCrtcTransform (Display *dpy,
for (p = 0; p < rep.currentNparamsFilter; p++) {
INT32 f;
if (e + 4 > end) {
XFree (attr);
XFree (extra);
return False;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment