]> sigrok.org Git - libsigrok.git/commitdiff
lascar-el-usb: fix potential NULL dereference and memory leak
authorGerhard Sittig <redacted>
Fri, 9 Feb 2018 18:09:27 +0000 (19:09 +0100)
committerUwe Hermann <redacted>
Fri, 9 Feb 2018 20:37:39 +0000 (21:37 +0100)
Check for successful allocation of multiple memory ranges, and release
partial allocations in the error path when one of them failed. This
fixes a potential memory leak, as well as avoids NULL dereferences.

This was reported by clang's scan-build.


No differences found