ANW: fix my fix for a file descriptor leak

Change-Id: Ief7b973fbdb76920abed19707963a0c3d306af31
This commit is contained in:
Jamie Gennis 2012-09-20 17:24:55 -07:00
parent 45b0385ac4
commit 96094ae27c

View file

@ -830,7 +830,7 @@ static inline int native_window_dequeue_buffer_and_wait(ANativeWindow *anw,
err = sync_wait(fenceFd, UINT_MAX);
close(fenceFd);
if (err != 0) {
anw->cancelBuffer(anw, *anb, fenceFd);
anw->cancelBuffer(anw, *anb, -1);
*anb = NULL;
}
}