diff options
Diffstat (limited to 'usr/src/cmd/newtask/newtask.c')
-rw-r--r-- | usr/src/cmd/newtask/newtask.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/usr/src/cmd/newtask/newtask.c b/usr/src/cmd/newtask/newtask.c index f4f0c2fe2d..1e8e0c9350 100644 --- a/usr/src/cmd/newtask/newtask.c +++ b/usr/src/cmd/newtask/newtask.c @@ -21,6 +21,7 @@ */ /* * Copyright (c) 2013 Gary Mills + * Copyright 2015, Joyent, Inc. * * Copyright 2005 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. @@ -535,7 +536,7 @@ set_ids(struct ps_prochandle *p, struct project *project, new_prpriv = malloc(prsz); if (new_prpriv == NULL) { preserve_error(gettext("can't allocate memory")); - free(old_prpriv); + proc_free_priv(old_prpriv); return (1); } @@ -564,7 +565,7 @@ set_ids(struct ps_prochandle *p, struct project *project, "privileges")); (void) Punsetflags(p, PR_KLC); free(new_prpriv); - free(old_prpriv); + proc_free_priv(old_prpriv); return (1); } (void) __priv_bracket(PRIV_ON); @@ -574,7 +575,7 @@ set_ids(struct ps_prochandle *p, struct project *project, "privileges")); (void) Punsetflags(p, PR_KLC); free(new_prpriv); - free(old_prpriv); + proc_free_priv(old_prpriv); return (1); } (void) __priv_bracket(PRIV_OFF); @@ -614,7 +615,7 @@ set_ids(struct ps_prochandle *p, struct project *project, Pstatus(p)->pr_pid); } free(new_prpriv); - free(old_prpriv); + proc_free_priv(old_prpriv); return (error); } |