summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sys/kern/kern_exec.c6
-rw-r--r--sys/kern/kern_proc.c3
-rw-r--r--sys/sys/proc.h1
3 files changed, 4 insertions, 6 deletions
diff --git a/sys/kern/kern_exec.c b/sys/kern/kern_exec.c
index 385ba01369c5..22f1cc173071 100644
--- a/sys/kern/kern_exec.c
+++ b/sys/kern/kern_exec.c
@@ -753,10 +753,8 @@ done1:
crfree(tracecred);
#endif
vn_lock(imgp->vp, LK_EXCLUSIVE | LK_RETRY, td);
- if (oldargs != NULL)
- pargs_drop(oldargs);
- if (newargs != NULL)
- pargs_drop(newargs);
+ pargs_drop(oldargs);
+ pargs_drop(newargs);
if (oldsigacts != NULL)
sigacts_free(oldsigacts);
diff --git a/sys/kern/kern_proc.c b/sys/kern/kern_proc.c
index b4735843cd0b..20604a6635bc 100644
--- a/sys/kern/kern_proc.c
+++ b/sys/kern/kern_proc.c
@@ -92,6 +92,7 @@ static int proc_ctor(void *mem, int size, void *arg, int flags);
static void proc_dtor(void *mem, int size, void *arg);
static int proc_init(void *mem, int size, int flags);
static void proc_fini(void *mem, int size);
+static void pargs_free(struct pargs *pa);
/*
* Other process lists
@@ -1147,7 +1148,7 @@ pargs_alloc(int len)
return (pa);
}
-void
+static void
pargs_free(struct pargs *pa)
{
diff --git a/sys/sys/proc.h b/sys/sys/proc.h
index cb02cf0f7016..8b49292ed502 100644
--- a/sys/sys/proc.h
+++ b/sys/sys/proc.h
@@ -840,7 +840,6 @@ int p_cansignal(struct thread *td, struct proc *p, int signum);
int p_canwait(struct thread *td, struct proc *p);
struct pargs *pargs_alloc(int len);
void pargs_drop(struct pargs *pa);
-void pargs_free(struct pargs *pa);
void pargs_hold(struct pargs *pa);
void procinit(void);
void proc_linkup0(struct proc *p, struct thread *td);