Marco Trevisan (Treviño)
10945f8546
cleanup: Remove fp_internal.h and update drivers_api.h
...
Remove the uneeded internal API, as we can now include each header directly
if needed, while move the assembling stuff to the drivers API.
2019-12-17 14:38:19 +01:00
Marco Trevisan (Treviño)
2642fc6560
fpi-usb-transfer: Take ownership of the transfer when submitting it
...
When a transfer is completed, we automatically unref it since we can't
consider it valid anymore since this point.
Update the drivers not to free the transfer after submitting anymore.
2019-11-27 21:02:19 +01:00
Marco Trevisan (Treviño)
d1fb1e26f3
Uncrustify everything except for nbis
2019-11-20 20:38:06 +01:00
Benjamin Berg
7ef64b5f5f
aes3k: Port aes3500 and aes4000 drivers to new API
2019-11-20 13:53:45 +01:00
Bastien Nocera
c11126181e
aeslib: Fix use-after-free in aeslib
...
If a USB transfer is started but not completed in one go, the wdata we
pass to continue_write_regv() will already be freed by the time we try
to use it again.
Only free() the wdata on error, or when the USB transfer is completed.
Closes : #180
2019-08-08 14:18:47 +02:00
Bastien Nocera
cec307ce7f
aeslib: Fix memory leak in aes_write_regv()
...
libfprint/drivers/aeslib.c:156:1: warning: Potential leak of memory pointed to by 'wdata'
}
^
2018-12-12 16:17:32 +01:00
Bastien Nocera
1d93b86569
lib: Rename assembling.[ch]
...
This is already self-contained.
2018-09-28 15:12:39 +02:00
Bastien Nocera
10ae8ffb55
drivers: Simplify libusb_alloc_transfer(0) calls
...
By using our new, never-failing, USB allocation wrapper. As it can never
fail, we can also remove all the error paths for the allocations
failing.
2018-09-19 17:06:17 +02:00
Bastien Nocera
f2bc826a20
lib: Move aeslib.[ch] to the drivers directory
...
As it's used by drivers, and isn't a set of generic helpers.
2018-09-19 15:16:40 +02:00