summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorotto <otto@openbsd.org>2004-07-17 06:55:02 +0000
committerotto <otto@openbsd.org>2004-07-17 06:55:02 +0000
commit746343ea99387e05de8ffcdf474882867199e672 (patch)
treee97f967bc84826ca001f610976f3aad98be9277b
parentfrom netbsd, umass.c 1.98, umassvar.h 1.20 (diff)
downloadwireguard-openbsd-746343ea99387e05de8ffcdf474882867199e672.tar.xz
wireguard-openbsd-746343ea99387e05de8ffcdf474882867199e672.zip
Do not use after free; from Tor Egge via freebsd.
ok matthieu@ deraadt@
-rw-r--r--usr.sbin/amd/amd/afs_ops.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/usr.sbin/amd/amd/afs_ops.c b/usr.sbin/amd/amd/afs_ops.c
index 43a20c3d182..db628208588 100644
--- a/usr.sbin/amd/amd/afs_ops.c
+++ b/usr.sbin/amd/amd/afs_ops.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: afs_ops.c,v 1.11 2003/06/02 23:36:51 millert Exp $ */
+/* $OpenBSD: afs_ops.c,v 1.12 2004/07/17 06:55:02 otto Exp $ */
/*
* Copyright (c) 1990 Jan-Simon Pendry
@@ -1518,8 +1518,8 @@ in_progrss:
return new_mp;
}
- if (error && (cp->mp->am_mnt->mf_ops == &efs_ops))
- cp->mp->am_error = error;
+ if (error && (new_mp->am_mnt->mf_ops == &efs_ops))
+ new_mp->am_error = error;
assign_error_mntfs(new_mp);