xorg-x11-libs/libXxf86misc-xcb.diff

50 lines
1.7 KiB
Diff
Raw Normal View History

Index: src/XF86Misc.c
===================================================================
--- src/XF86Misc.c.orig
+++ src/XF86Misc.c
@@ -154,6 +154,8 @@ Bool XF86MiscGetMouseSettings(dpy, mouse
if (!(mouseinfo->device = Xcalloc(rep.devnamelen + 1, 1))) {
_XEatData(dpy, (rep.devnamelen+3) & ~3);
Xfree(mouseinfo->device);
+ UnlockDisplay(dpy);
+ SyncHandle();
return False;
}
_XReadPad(dpy, mouseinfo->device, rep.devnamelen);
@@ -308,6 +310,8 @@ Bool XF86MiscGetFilePaths(dpy, filpaths)
if (!(filpaths->configfile = Xcalloc(rep.configlen + 1, 1))) {
_XEatData(dpy, ((rep.configlen+3) & ~3) + ((rep.modulelen+3) & ~3)
+ ((rep.loglen+3) & ~3));
+ UnlockDisplay(dpy);
+ SyncHandle();
return False;
}
}
@@ -318,6 +322,8 @@ Bool XF86MiscGetFilePaths(dpy, filpaths)
+ ((rep.loglen+3) & ~3));
if (filpaths->configfile)
Xfree(filpaths->configfile);
+ UnlockDisplay(dpy);
+ SyncHandle();
return False;
}
}
@@ -330,6 +336,8 @@ Bool XF86MiscGetFilePaths(dpy, filpaths)
Xfree(filpaths->configfile);
if (filpaths->modulepath)
Xfree(filpaths->modulepath);
+ UnlockDisplay(dpy);
+ SyncHandle();
return False;
}
}
@@ -394,6 +402,8 @@ Status XF86MiscPassMessage(dpy, screen,
if (rep.mesglen) {
if (!(*retmsg = Xcalloc(rep.mesglen + 1, 1))) {
_XEatData(dpy, ((rep.mesglen+3) & ~3));
+ UnlockDisplay(dpy);
+ SyncHandle();
return BadAlloc;
}
_XReadPad(dpy, *retmsg, rep.mesglen);