C++ wrapper: Fix use-after-free issue in List::find_all()
[libftdi] / ftdipp / ftdi.hpp
index 2ac4bc2..d853717 100644 (file)
@@ -32,7 +32,7 @@ on this file might be covered by the GNU General Public License.
 #include <list>
 #include <string>
 #include <boost/shared_ptr.hpp>
-#include "ftdi.h"
+#include <ftdi.h>
 
 namespace Ftdi
 {
@@ -123,7 +123,6 @@ public:
     /* BitBang mode */
     int set_bitmode(unsigned char bitmask, unsigned char mode);
     int set_bitmode(unsigned char bitmask, enum ftdi_mpsse_mode mode);
-    int DEPRECATED(bitbang_enable(unsigned char bitmask));
     int bitbang_disable();
     int read_pins(unsigned char *pins);
 
@@ -175,7 +174,7 @@ public:
     List(struct ftdi_device_list* devlist = 0);
     ~List();
 
-    static List* find_all(int vendor, int product);
+    static List* find_all(Context &context, int vendor, int product);
 
     /// List type storing "Context" objects
     typedef std::list<Context> ListType;