Call pargs_drop() unconditionally in do_execve(), the function correctly
handles the NULL argument. Make pargs_free() static. MFC after: 1 week
This commit is contained in:
parent
a0a58ba099
commit
e2333a32b6
@ -832,10 +832,8 @@ done1:
|
|||||||
crfree(tracecred);
|
crfree(tracecred);
|
||||||
#endif
|
#endif
|
||||||
vn_lock(imgp->vp, LK_EXCLUSIVE | LK_RETRY);
|
vn_lock(imgp->vp, LK_EXCLUSIVE | LK_RETRY);
|
||||||
if (oldargs != NULL)
|
pargs_drop(oldargs);
|
||||||
pargs_drop(oldargs);
|
pargs_drop(newargs);
|
||||||
if (newargs != NULL)
|
|
||||||
pargs_drop(newargs);
|
|
||||||
if (oldsigacts != NULL)
|
if (oldsigacts != NULL)
|
||||||
sigacts_free(oldsigacts);
|
sigacts_free(oldsigacts);
|
||||||
|
|
||||||
|
@ -123,6 +123,7 @@ static int proc_ctor(void *mem, int size, void *arg, int flags);
|
|||||||
static void proc_dtor(void *mem, int size, void *arg);
|
static void proc_dtor(void *mem, int size, void *arg);
|
||||||
static int proc_init(void *mem, int size, int flags);
|
static int proc_init(void *mem, int size, int flags);
|
||||||
static void proc_fini(void *mem, int size);
|
static void proc_fini(void *mem, int size);
|
||||||
|
static void pargs_free(struct pargs *pa);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Other process lists
|
* Other process lists
|
||||||
@ -1177,7 +1178,7 @@ pargs_alloc(int len)
|
|||||||
return (pa);
|
return (pa);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
static void
|
||||||
pargs_free(struct pargs *pa)
|
pargs_free(struct pargs *pa)
|
||||||
{
|
{
|
||||||
|
|
||||||
|
@ -797,7 +797,6 @@ int p_cansignal(struct thread *td, struct proc *p, int signum);
|
|||||||
int p_canwait(struct thread *td, struct proc *p);
|
int p_canwait(struct thread *td, struct proc *p);
|
||||||
struct pargs *pargs_alloc(int len);
|
struct pargs *pargs_alloc(int len);
|
||||||
void pargs_drop(struct pargs *pa);
|
void pargs_drop(struct pargs *pa);
|
||||||
void pargs_free(struct pargs *pa);
|
|
||||||
void pargs_hold(struct pargs *pa);
|
void pargs_hold(struct pargs *pa);
|
||||||
void procinit(void);
|
void procinit(void);
|
||||||
void proc_linkup0(struct proc *p, struct thread *td);
|
void proc_linkup0(struct proc *p, struct thread *td);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user