Commit Graph
9 Commits
Author SHA1 Message Date
Robin Getz c29e491194 visa: close dynamically loaded VISA library
Unload the dynamically loaded VISA library when the VISA object is
destroyed and ensure radio astronomy VISA sessions are closed first.

Coverity reported a resource leak because `visaLibrary` was loaded with
`LoadLibrary`/`dlopen` but was never released. It also identified
uninitialized VISA function pointers and the library handle.

Initialize the remaining pointers, add platform-specific library cleanup,
and close all radio astronomy instrument sessions before releasing the
default VISA resource manager. The other VISA users were reviewed to
verify that their sessions and default resource managers are also closed
before their VISA objects are destroyed.

The library is only unloaded when no default resource manager session
remains active, avoiding unloading the VISA library while it is still in
use.

Signed-off-by: Robin Getz <rgetz503@gmail.com>
2026-08-09 19:35:41 -04:00
Jon Beniston 071f36da23 VISA: Fix potential undefined behaviour. 2026-03-26 21:35:09 +00:00
f4exb 439b5d094c Rewriting of copyright notices for sdrbase. Part of #1893 2023-11-19 13:43:10 +01:00
Jon Beniston 2cb2a8d555 Update sdrbase and sdrgui to support Qt5 and Qt6 2022-11-17 14:41:55 +00:00
Jon Beniston 3bd0776706 VISA: Prevent crash if VISA library not available 2022-09-16 14:48:17 +01:00
Jon Beniston 9895d4618c VISA: Add methods to get available resources. Make I/O logging optional. Check for errors in processCommands. 2022-09-16 08:54:55 +01:00
Jon Beniston fbef25884e Add Radio Astronomy plugin 2021-10-12 11:31:14 +01:00
Jon Beniston 5d24bf9086 Fix gcc warnings 2021-06-09 17:14:56 +01:00
Jon Beniston 97669585ad Add noise figure plugin 2021-06-09 16:17:59 +01:00