Skip to content

Commit

Permalink
Merge pull request #2168 from lonicerae/need_copy_before_split
Browse files Browse the repository at this point in the history
Make a copy before spliting.
  • Loading branch information
jan-cerny authored Oct 21, 2024
2 parents d6f9547 + 593e515 commit 9538c5e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/OVAL/probes/probe/worker.c
Original file line number Diff line number Diff line change
Expand Up @@ -974,7 +974,7 @@ static SEXP_t *probe_set_eval(probe_t *probe, SEXP_t *set, size_t depth)

static void _add_blocked_paths(struct oscap_list *bpaths)
{
char *envar = getenv("OSCAP_PROBE_IGNORE_PATHS");
char *envar = oscap_strdup(getenv("OSCAP_PROBE_IGNORE_PATHS"));
if (envar == NULL) {
return;
}
Expand All @@ -985,6 +985,7 @@ static void _add_blocked_paths(struct oscap_list *bpaths)
for (int i = 0; paths[i]; ++i) {
oscap_list_add(bpaths, strdup(paths[i]));
}
free(envar);
free(paths);
#endif
}
Expand Down

0 comments on commit 9538c5e

Please sign in to comment.