diff options
author | Theo Buehler <tb@cvs.openbsd.org> | 2021-11-18 16:58:00 +0000 |
---|---|---|
committer | Theo Buehler <tb@cvs.openbsd.org> | 2021-11-18 16:58:00 +0000 |
commit | 9758561d33f2126a5f3a8180ab73b224a6887c34 (patch) | |
tree | f2d46d54584ddc099b46cce5d5880741835c10a4 | |
parent | da7ccee85957e1260fbec8b100615dc5fde72771 (diff) |
vndsetcred: don't a reference to credentials in error path.
ok deraadt
-rw-r--r-- | sys/dev/vnd.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/sys/dev/vnd.c b/sys/dev/vnd.c index e08935d0376..94b0da08743 100644 --- a/sys/dev/vnd.c +++ b/sys/dev/vnd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: vnd.c,v 1.172 2021/10/09 14:47:02 deraadt Exp $ */ +/* $OpenBSD: vnd.c,v 1.173 2021/11/18 16:57:59 tb Exp $ */ /* $NetBSD: vnd.c,v 1.26 1996/03/30 23:06:11 christos Exp $ */ /* @@ -677,6 +677,8 @@ vndsetcred(struct proc *p, struct vnode *vp, struct vnd_ioctl *vio, free(buf, M_TEMP, DEV_BSIZE); if (error == 0) *newcredp = new; + else + crfree(new); return (error); } |