diff options
-rw-r--r-- | sys/dev/systrace.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/sys/dev/systrace.c b/sys/dev/systrace.c index 122a885155e..a61caabe9b1 100644 --- a/sys/dev/systrace.c +++ b/sys/dev/systrace.c @@ -1,4 +1,4 @@ -/* $OpenBSD: systrace.c,v 1.67 2014/04/18 11:51:17 guenther Exp $ */ +/* $OpenBSD: systrace.c,v 1.68 2014/06/15 20:22:12 matthew Exp $ */ /* * Copyright 2002 Niels Provos <provos@citi.umich.edu> * All rights reserved. @@ -1101,6 +1101,12 @@ systrace_getcwd(struct fsystrace *fst, struct str_process *strp, int atfd) return (EINVAL); } + /* Release any saved vnodes. */ + if (fst->fd_cdir != NULL) + vrele(fst->fd_cdir); + if (fst->fd_rdir != NULL) + vrele(fst->fd_rdir); + /* Store our current values */ fst->fd_pid = strp->pid; fst->fd_cdir = myfdp->fd_cdir; |