diff --git a/src/OVAL/probes/independent/textfilecontent_probe.c b/src/OVAL/probes/independent/textfilecontent_probe.c index 54c9ab1be1..bbea95d837 100644 --- a/src/OVAL/probes/independent/textfilecontent_probe.c +++ b/src/OVAL/probes/independent/textfilecontent_probe.c @@ -214,7 +214,6 @@ static int process_file(const char *prefix, const char *path, const char *filena for (k = 0; k < substr_cnt; ++k) free(substrs[k]); } - free(substrs); } cleanup: diff --git a/src/XCCDF_POLICY/xccdf_policy_remediate.c b/src/XCCDF_POLICY/xccdf_policy_remediate.c index 9837dc4551..9233913d9c 100644 --- a/src/XCCDF_POLICY/xccdf_policy_remediate.c +++ b/src/XCCDF_POLICY/xccdf_policy_remediate.c @@ -1113,6 +1113,7 @@ static int _xccdf_policy_rule_generate_kickstart_fix(struct xccdf_policy *policy if (state != KS_R_P_NORMAL) { oscap_seterr(OSCAP_EFAMILY_OSCAP, "Unfinished block in kickstart remediation in rule %s\n", xccdf_rule_get_id(rule)); } + free(block); free(lines); free(dup); free(fix_text); @@ -1604,18 +1605,22 @@ static int _generate_kickstart_packages(struct kickstart_commands *cmds, int out return 0; } -static void _write_tailoring_to_fd(struct oscap_source *tailoring, int output_fd) +static int _write_tailoring_to_fd(struct oscap_source *tailoring, int output_fd) { if (tailoring == NULL) - return; + return 0; _write_text_to_fd(output_fd, "cat >/root/oscap_tailoring.xml <