summaryrefslogtreecommitdiffstats
path: root/sys
diff options
context:
space:
mode:
Diffstat (limited to 'sys')
-rw-r--r--sys/fs/unionfs/union_subr.c6
-rw-r--r--sys/miscfs/union/union_subr.c6
2 files changed, 10 insertions, 2 deletions
diff --git a/sys/fs/unionfs/union_subr.c b/sys/fs/unionfs/union_subr.c
index 8868b2a..e37593d 100644
--- a/sys/fs/unionfs/union_subr.c
+++ b/sys/fs/unionfs/union_subr.c
@@ -35,7 +35,7 @@
* SUCH DAMAGE.
*
* @(#)union_subr.c 8.20 (Berkeley) 5/20/95
- * $Id: union_subr.c,v 1.15 1997/03/23 03:36:59 bde Exp $
+ * $Id: union_subr.c,v 1.16 1997/04/13 06:25:03 phk Exp $
*/
#include <sys/param.h>
@@ -752,6 +752,10 @@ union_relookup(um, dvp, vpp, cnp, cn, path, pathlen)
error = relookup(dvp, vpp, cn);
if (!error)
vrele(dvp);
+ else {
+ free(cn->cn_pnbuf, M_NAMEI);
+ cn->cn_pnbuf = '\0';
+ }
return (error);
}
diff --git a/sys/miscfs/union/union_subr.c b/sys/miscfs/union/union_subr.c
index 8868b2a..e37593d 100644
--- a/sys/miscfs/union/union_subr.c
+++ b/sys/miscfs/union/union_subr.c
@@ -35,7 +35,7 @@
* SUCH DAMAGE.
*
* @(#)union_subr.c 8.20 (Berkeley) 5/20/95
- * $Id: union_subr.c,v 1.15 1997/03/23 03:36:59 bde Exp $
+ * $Id: union_subr.c,v 1.16 1997/04/13 06:25:03 phk Exp $
*/
#include <sys/param.h>
@@ -752,6 +752,10 @@ union_relookup(um, dvp, vpp, cnp, cn, path, pathlen)
error = relookup(dvp, vpp, cn);
if (!error)
vrele(dvp);
+ else {
+ free(cn->cn_pnbuf, M_NAMEI);
+ cn->cn_pnbuf = '\0';
+ }
return (error);
}
OpenPOWER on IntegriCloud