Module Name: src Committed By: maxv Date: Mon Oct 20 06:41:52 UTC 2014
Modified Files: src/sys/ufs/chfs: chfs_vfsops.c Log Message: Memory leak. Found by my code scanner. ok christos@ To generate a diff of this commit: cvs rdiff -u -r1.11 -r1.12 src/sys/ufs/chfs/chfs_vfsops.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/sys/ufs/chfs/chfs_vfsops.c diff -u src/sys/ufs/chfs/chfs_vfsops.c:1.11 src/sys/ufs/chfs/chfs_vfsops.c:1.12 --- src/sys/ufs/chfs/chfs_vfsops.c:1.11 Wed Apr 16 18:55:19 2014 +++ src/sys/ufs/chfs/chfs_vfsops.c Mon Oct 20 06:41:51 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: chfs_vfsops.c,v 1.11 2014/04/16 18:55:19 maxv Exp $ */ +/* $NetBSD: chfs_vfsops.c,v 1.12 2014/10/20 06:41:51 maxv Exp $ */ /*- * Copyright (c) 2010 Department of Software Engineering, @@ -152,9 +152,12 @@ chfs_mount(struct mount *mp, } /* Look up the name and verify that it's sane. */ NDINIT(&nd, LOOKUP, FOLLOW, pb); - if ((err = namei(&nd)) != 0 ) + if ((err = namei(&nd)) != 0 ) { + pathbuf_destroy(pb); return (err); + } devvp = nd.ni_vp; + pathbuf_destroy(pb); /* Be sure this is a valid block device */ if (devvp->v_type != VBLK)