]> sigrok.org Git - libsigrok.git/commit
lcr/es51919: clean but don't free dev context in cleanup callback
authorGerhard Sittig <redacted>
Fri, 18 Aug 2017 18:07:23 +0000 (20:07 +0200)
committerUwe Hermann <redacted>
Sat, 19 Aug 2017 17:21:51 +0000 (19:21 +0200)
commit12788e7e40b53732bc05904b34faabda39b47f02
tree9af398127b9e3919711591c2ea3bb6fa90e1f8e3
parent1503d4571b1ed2a1afb75198ca3b7ffc97c829f8
lcr/es51919: clean but don't free dev context in cleanup callback

The es51919_serial_clean() routine is called by std_dev_clear_with_callback().
Common code unconditionally frees the 'priv' part. The cleanup callback only
shall release descending resources which are local to the callee and opaque
to the caller.

This fixes a double free error. Tested with PeakTech 2170.

  $ sigrok-cli -d peaktech-2170:conn=/dev/ttyUSB0 --show
src/lcr/es51919.c