]> sigrok.org Git - libsigrok.git/commit
hameg-hmo: fix potential NULL dereference
authorGerhard Sittig <redacted>
Sat, 10 Feb 2018 11:20:05 +0000 (12:20 +0100)
committerGerhard Sittig <redacted>
Sat, 10 Feb 2018 14:34:20 +0000 (15:34 +0100)
commiteac9fcd2685a0068a9c9884a2b96629088a20ca5
tree10e7cba81683332e5f7f15591bb307b3e62325b3
parentaddbb09bf81444030dcd17094e8892a91875b157
hameg-hmo: fix potential NULL dereference

Check for successful allocation before accessing struct members. Return
with an error from device initialization when allocation fails.

This was reported by clang's scan-build.
src/hardware/hameg-hmo/protocol.c