summaryrefslogtreecommitdiff
path: root/src/Xv.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/Xv.c')
-rw-r--r--src/Xv.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/Xv.c b/src/Xv.c
index b4e2158..8e069c0 100644
--- a/src/Xv.c
+++ b/src/Xv.c
@@ -194,6 +194,7 @@ XvQueryAdaptors(
size = rep.length << 2;
if ((buffer = Xmalloc(size)) == NULL) {
+ _XEatDataWords(dpy, rep.length);
UnlockDisplay(dpy);
SyncHandle();
return (XvBadAlloc);
@@ -351,6 +352,7 @@ XvQueryEncodings(
size = rep.length << 2;
if ((buffer = Xmalloc(size)) == NULL) {
+ _XEatDataWords(dpy, rep.length);
UnlockDisplay(dpy);
SyncHandle();
return (XvBadAlloc);