l29ah / libmpsse

(a maintenance fork of the) Open source library for SPI/I2C control via FTDI chips

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Potential memory leak in Close

maksymko opened this issue · comments

Close() only calls ftdi_deinit(mpsse->ftdi) if mpsse was open.

However, Open() initializes mpsse->ftdi long before setting mpsse->open = 1 and only does that if some other conditions are true.