]> sigrok.org Git - libsigrok.git/commit
serial-dmm: Fix segfault when no device is used
authorAlexandru Gagniuc <redacted>
Wed, 5 Dec 2012 21:16:52 +0000 (15:16 -0600)
committerUwe Hermann <redacted>
Wed, 5 Dec 2012 23:21:45 +0000 (00:21 +0100)
commit26be4ebef369e465eb5f13ee7bbab71b62e455f6
treec823d27110d63925921f4bf8b7a3fdff0860deef
parent63c07e48c627684f04d70e7dea2baf7c72ff2a41
serial-dmm: Fix segfault when no device is used

di was initialized as NULL. If no device covered by this driver
is used, di remains NULL. This causes a segmentation fault when
calling clear_instances().

Check for di being NULL.

Signed-off-by: Alexandru Gagniuc <redacted>
hardware/serial-dmm/api.c