sr: fx2lafw: Properly free transfer
authorLars-Peter Clausen <lars@metafoo.de>
Sun, 24 Jun 2012 10:08:59 +0000 (12:08 +0200)
committerUwe Hermann <uwe@hermann-uwe.de>
Wed, 27 Jun 2012 22:40:51 +0000 (00:40 +0200)
commitc5f4ababafe004042d0a92b85ce4bbafdc3a1034
tree47afa5b04dff6fb6626b7d6ffd0b792f79dd37c0
parent8301bd8358959f9740a8b81cecc1780d80ca86f5
sr: fx2lafw: Properly free transfer

When freeing a transfer we also have to free the transfer buffer. We also have
to keep track of the number of allocated transfers and if the freed transfer was
the last one stop acquisition. This patch introduces a helper function which
takes care of all of this.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
libsigrok/hardware/fx2lafw/fx2lafw.c