Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix problems reported by OpenScanHub #2194

Merged
merged 2 commits into from
Jan 10, 2025
Merged

Conversation

jan-cerny
Copy link
Member

This PR will fix problems in the 1.4.1 release reported by OpenScanHub after downstreaming the release.
For more details, please read commit messages of all commits.

Addressing this OpenScanHub issue:
1. Defect type: RESOURCE_LEAK
5. openscap-1.4.1/src/XCCDF_POLICY/xccdf_policy_remediate.c:726:3: alloc_arg: "oscap_pcre_compile" allocates memory that is stored into "err".
19. openscap-1.4.1/src/XCCDF_POLICY/xccdf_policy_remediate.c:774:2: leaked_storage: Variable "err" going out of scope leaks the storage it points to.
   772|   		oscap_pcre_free(tab[i].re);
   773|
   774|-> 	return ret;
   775|   }
   776|
Addressing this OpenScanHub issue:
2. Defect type: RESOURCE_LEAK
15. openscap-1.4.1/src/OVAL/probes/independent/textfilecontent_probe.c:203:3: alloc_arg: "oscap_pcre_get_substrings" allocates memory that is stored into "substrs".
17. openscap-1.4.1/src/OVAL/probes/independent/textfilecontent_probe.c:209:4: noescape: Resource "substrs" is not freed or pointed-to in "create_item".
28. openscap-1.4.1/src/OVAL/probes/independent/textfilecontent_probe.c:228:2: leaked_storage: Variable "substrs" going out of scope leaks the storage it points to.
   226|   	free(whole_path_with_prefix);
   227|
   228|-> 	return ret;
   229|   }
   230|
@jan-cerny jan-cerny added this to the 1.4.2 milestone Jan 10, 2025
@evgenyz evgenyz merged commit 83709fc into OpenSCAP:main Jan 10, 2025
17 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants