With the new popt release, a memory leak was fixed. Wmic relais into the leak to get the command line options (hostname, namespace, etc). Once the leak is fixed, the command line options are not available anymore.
This patch makes a deep copy of the options and now are available again.
Also, adds a new file with structure definition and functions to init and free the structure with the program arguments, necessary not only for wmic, but also for other libs related to wmi (wmireg, wmirsop).
What
With the new popt release, a memory leak was fixed. Wmic relais into the leak to get the command line options (hostname, namespace, etc). Once the leak is fixed, the command line options are not available anymore.
This patch makes a deep copy of the options and now are available again.
Also, adds a new file with structure definition and functions to init and free the structure with the program arguments, necessary not only for wmic, but also for other libs related to wmi (wmireg, wmirsop).
Close #77 Close https://github.com/greenbone/openvas-scanner/issues/1491
Jira: SC-923
Why
wmi didn't work. This patch solve it.
References
Checklist