]> sigrok.org Git - libsigrok.git/commit
output/srzip: fix potential "use after free"
authorGerhard Sittig <redacted>
Sat, 10 Feb 2018 09:18:20 +0000 (10:18 +0100)
committerGerhard Sittig <redacted>
Sat, 10 Feb 2018 14:33:23 +0000 (15:33 +0100)
commitf396351704d6875f72c858a3e16aa698b64ecc43
tree07076a33b21a19bd1884a9b7440f9a384b4de6d7
parent499f5045dd505944319cdc388f6b3cd578ee9a6a
output/srzip: fix potential "use after free"

The compiler marks a potential use after free, which the current
implementation won't trigger. The error only occurs when a sigrok
channel is neither logic nor analog.

Address the issue nevertheless, to silence the compiler warning, and to
protect against possible programming errors when a future implementation
should support more channel types.

This was reported by clang's scan-build.
src/output/srzip.c