projects
/
project
/
procd.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
aa44624
)
jail: correctly check for null pointer
author
Philipp Meier
<philipp.meier@westermo.com>
Tue, 8 Nov 2022 13:38:37 +0000
(14:38 +0100)
committer
Daniel Golle
<daniel@makrotopia.org>
Thu, 10 Nov 2022 20:17:00 +0000
(20:17 +0000)
Handle case where opts.sysctl is not used.
Signed-off-by: Philipp Meier <philipp.meier@westermo.com>
jail/jail.c
patch
|
blob
|
history
diff --git
a/jail/jail.c
b/jail/jail.c
index ce6b268ea28e1f2aa6768eed0cd24e70be5229f8..31b64e5ddb565e83378dd01cc7f46e8e899505bd 100644
(file)
--- a/
jail/jail.c
+++ b/
jail/jail.c
@@
-215,6
+215,10
@@
static void free_hooklist(struct hook_execvpe **hooklist)
static void free_sysctl(void) {
struct sysctl_val *cur;
+
+ if (!opts.sysctl)
+ return;
+
cur = *opts.sysctl;
while (cur) {