Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR fixes next covscan issues:
(Commit 1)
Defect type: COMPILER_WARNING
/src/OVAL/probes/unix/linux/systemdshared.h:147:12: warning[-Wunused-function]: 'get_all_systemd_units' defined but not used
Defect type: COMPILER_WARNING
/src/OVAL/probes/unix/linux/systemdshared.h:73:14: warning[-Wunused-function]: 'get_path_by_unit' defined but not used
(Commit 2)
Defect type: RESOURCE_LEAK
/src/OVAL/probes/unix/linux/fwupdsecattr_probe.c:326: leaked_storage: Variable "stream_id" going out of scope leaks the storage it points to.
Defect type: RESOURCE_LEAK
/src/OVAL/probes/unix/linux/fwupdsecattr_probe.c:238: leaked_storage: Variable "appstream_name" going out of scope leaks the storage it points to.
Defect type: RESOURCE_LEAK
/src/OVAL/probes/unix/linux/fwupdsecattr_probe.c:217: overwrite_var: Overwriting "appstream_name" in "appstream_name = dbus_value_to_string(&value_variant)" leaks the storage that "appstream_name" points to.
And, as bonus, the 3-rd Commit makes the
fwupdsecattr
probe test more stable and less dependent on the system configuration.