31 lines
995 B
Diff
31 lines
995 B
Diff
From a65dff2815eb10c3e420c61c81f1793a683630dc Mon Sep 17 00:00:00 2001
|
|
From: Flos Lonicerae <lonicerae@gmail.com>
|
|
Date: Sat, 19 Oct 2024 18:58:30 +0800
|
|
Subject: [PATCH] Make a copy before spliting.
|
|
|
|
---
|
|
src/OVAL/probes/probe/worker.c | 3 ++-
|
|
1 file changed, 2 insertions(+), 1 deletion(-)
|
|
|
|
diff --git a/src/OVAL/probes/probe/worker.c b/src/OVAL/probes/probe/worker.c
|
|
index d667127d63..e0a07c31ec 100644
|
|
--- a/src/OVAL/probes/probe/worker.c
|
|
+++ b/src/OVAL/probes/probe/worker.c
|
|
@@ -985,7 +985,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;
|
|
}
|
|
@@ -996,6 +996,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
|
|
}
|