1
0
mirror of https://github.com/f4exb/sdrangel.git synced 2026-08-22 19:45:06 -04:00
Files
sdrangel/plugins
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
..