]> sigrok.org Git - libsigrok.git/commit
session: fix use after free of session->devs as reported by valgrind
authorStefan Brüns <redacted>
Thu, 26 Nov 2015 01:30:42 +0000 (02:30 +0100)
committerUwe Hermann <redacted>
Sun, 29 Nov 2015 00:13:58 +0000 (01:13 +0100)
commitfe7b8efc6b36aa707365f1d23c645303a5f2307a
tree1c0e8c9475ad6a19714a6a495a60677c9c71d9c1
parentb3cfc6e98e34e54a11d5a9563f6f7ac282c92983
session: fix use after free of session->devs as reported by valgrind

==7478== Invalid write of size 8
==7478==    at 0x4E59182: sr_session_dev_remove_all (session.c:302)
==7478==    by 0x4E591CD: sr_session_destroy (session.c:265)
==7478==    by 0x4095D9: load_input_file_module (input.c:143)
==7478==    by 0x4097AB: load_input_file (input.c:157)
==7478==    by 0x40531E: main (main.c:288)
==7478==  Address 0x7877eb8 is 88 bytes inside a block of size 96 free'd
==7478==    at 0x4C2A37C: free (in /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so)
==7478==    by 0x4E5F454: sr_input_free (input.c:573)
==7478==    by 0x4095C3: load_input_file_module (input.c:140)
==7478==    by 0x4097AB: load_input_file (input.c:157)
==7478==    by 0x40531E: main (main.c:288)
include/libsigrok/proto.h
src/device.c
src/session.c