mirror of
https://gitlab.freedesktop.org/xorg/lib/libx11.git
synced 2026-05-07 10:58:19 +02:00
Bug #17616: Fix an XCB leak when the client has a non-fatal error handler.
This commit is contained in:
parent
db0b85db29
commit
2335eafe4b
1 changed files with 8 additions and 2 deletions
10
src/xcb_io.c
10
src/xcb_io.c
|
|
@ -409,15 +409,18 @@ Status _XReply(Display *dpy, xReply *rep, int extra, Bool discard)
|
|||
{
|
||||
case X_LookupColor:
|
||||
case X_AllocNamedColor:
|
||||
free(error);
|
||||
return 0;
|
||||
}
|
||||
break;
|
||||
case BadFont:
|
||||
if(err->majorCode == X_QueryFont)
|
||||
free(error);
|
||||
return 0;
|
||||
break;
|
||||
case BadAlloc:
|
||||
case BadAccess:
|
||||
free(error);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
@ -426,10 +429,13 @@ Status _XReply(Display *dpy, xReply *rep, int extra, Bool discard)
|
|||
* want to suppress the error.
|
||||
*/
|
||||
for(ext = dpy->ext_procs; ext; ext = ext->next)
|
||||
if(ext->error && ext->error(dpy, err, &ext->codes, &ret_code))
|
||||
if(ext->error && ext->error(dpy, err, &ext->codes, &ret_code)) {
|
||||
free(error);
|
||||
return ret_code;
|
||||
}
|
||||
|
||||
_XError(dpy, (xError *) error);
|
||||
_XError(dpy, err);
|
||||
free(error);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue