Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/netbsd-3]: src/sys/ufs/ffs Pull up following revision(s) (requested by d...



details:   https://anonhg.NetBSD.org/src/rev/952d5952c245
branches:  netbsd-3
changeset: 577875:952d5952c245
user:      tron <tron%NetBSD.org@localhost>
date:      Fri Mar 10 13:02:08 2006 +0000

description:
Pull up following revision(s) (requested by drochner in ticket #1189):
        sys/ufs/ffs/ffs_vfsops.c: revision 1.168
fix crash in mount error handling: don't free storage which was not
malloc'd

diffstat:

 sys/ufs/ffs/ffs_vfsops.c |  8 +++++---
 1 files changed, 5 insertions(+), 3 deletions(-)

diffs (30 lines):

diff -r 7d2be9ccb334 -r 952d5952c245 sys/ufs/ffs/ffs_vfsops.c
--- a/sys/ufs/ffs/ffs_vfsops.c  Fri Mar 10 12:58:57 2006 +0000
+++ b/sys/ufs/ffs/ffs_vfsops.c  Fri Mar 10 13:02:08 2006 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: ffs_vfsops.c,v 1.162.2.1 2005/08/24 18:43:37 riz Exp $ */
+/*     $NetBSD: ffs_vfsops.c,v 1.162.2.2 2006/03/10 13:02:08 tron Exp $        */
 
 /*
  * Copyright (c) 1989, 1991, 1993, 1994
@@ -32,7 +32,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ffs_vfsops.c,v 1.162.2.1 2005/08/24 18:43:37 riz Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ffs_vfsops.c,v 1.162.2.2 2006/03/10 13:02:08 tron Exp $");
 
 #if defined(_KERNEL_OPT)
 #include "opt_ffs.h"
@@ -752,8 +752,10 @@
                }
                error = bread(devvp, sblock_try[i] / size, SBLOCKSIZE, cred,
                              &bp);
-               if (error)
+               if (error) {
+                       fs = NULL;
                        goto out;
+               }
                fs = (struct fs*)bp->b_data;
                fsblockloc = sblockloc = sblock_try[i];
                if (fs->fs_magic == FS_UFS1_MAGIC) {



Home | Main Index | Thread Index | Old Index