1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-14 10:09:48 +00:00

Oops, only free component name buffer if namei() didn't. This bug has

been in here since I wrote the code 3 years ago! Thanks, Bruce!

Submitted by:	bde
This commit is contained in:
David Greenman 1997-04-04 07:30:06 +00:00
parent f98b4a3bdc
commit a3cf6ebae3
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=24614

View File

@ -23,7 +23,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
* $Id: kern_exec.c,v 1.54 1997/04/04 01:30:33 davidg Exp $
* $Id: kern_exec.c,v 1.55 1997/04/04 04:17:11 davidg Exp $
*/
#include <sys/param.h>
@ -345,9 +345,10 @@ execve(p, uap, retval)
brelse(bp);
else if (imgp->image_header != NULL)
free((void *)imgp->image_header, M_TEMP);
if (ndp->ni_vp)
if (ndp->ni_vp) {
vrele(ndp->ni_vp);
FREE(ndp->ni_cnd.cn_pnbuf, M_NAMEI);
FREE(ndp->ni_cnd.cn_pnbuf, M_NAMEI);
}
exec_fail:
if (imgp->vmspace_destroyed) {