mirror of
https://gitlab.freedesktop.org/libfprint/libfprint.git
synced 2025-11-15 07:38:12 +00:00
Fix fp_get_pollfds()
It was increasing i too early, and writing past the allocated structures.
This commit is contained in:
committed by
Daniel Drake
parent
d816fed5c3
commit
e5da34e80a
@@ -308,9 +308,10 @@ API_EXPORTED size_t fp_get_pollfds(struct fp_pollfd **pollfds)
|
||||
|
||||
ret = g_malloc(sizeof(struct fp_pollfd) * cnt);
|
||||
i = 0;
|
||||
while ((usbfd = usbfds[i++]) != NULL) {
|
||||
while ((usbfd = usbfds[i]) != NULL) {
|
||||
ret[i].fd = usbfd->fd;
|
||||
ret[i].events = usbfd->events;
|
||||
i++;
|
||||
}
|
||||
|
||||
*pollfds = ret;
|
||||
|
||||
Reference in New Issue
Block a user