C++ wrapper: Fix use-after-free issue in List::find_all()
authorThomas Jarosch <thomas.jarosch@intra2net.com>
Sun, 23 Dec 2012 16:53:25 +0000 (17:53 +0100)
committerThomas Jarosch <thomas.jarosch@intra2net.com>
Sun, 23 Dec 2012 16:57:11 +0000 (17:57 +0100)
commit7c21beca63e7d4b07d7ebff25428ca4cfdbc8ec5
tree1696c098263835191e97281ba82fa9fe20a43629
parenta67c3be47d1af396f4ad1eb7e770fb3be4d58334
C++ wrapper: Fix use-after-free issue in List::find_all()

We can no longer call ftdi_deinit() inside find_all().
This will call libusb_exit() which invalidates all further
operations on device lists / usb devices pointers.

Instead we pass in the Ftdi::Context from the calling side.
examples/find_all_pp.cpp
ftdipp/ftdi.cpp
ftdipp/ftdi.hpp