Source-Changes-HG archive

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

[src/trunk]: src/sys/lib/libsa Don't call f_dev->dv_close if it's a null poin...



details:   https://anonhg.NetBSD.org/src/rev/f890474a4e4d
branches:  trunk
changeset: 467579:f890474a4e4d
user:      simonb <simonb%NetBSD.org@localhost>
date:      Fri Mar 26 03:16:15 1999 +0000

description:
Don't call f_dev->dv_close if it's a null pointer when an open() call
fails.

diffstat:

 sys/lib/libsa/open.c |  4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diffs (18 lines):

diff -r 53cde19305a1 -r f890474a4e4d sys/lib/libsa/open.c
--- a/sys/lib/libsa/open.c      Fri Mar 26 03:03:37 1999 +0000
+++ b/sys/lib/libsa/open.c      Fri Mar 26 03:16:15 1999 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: open.c,v 1.17 1998/09/22 00:36:45 ross Exp $   */
+/*     $NetBSD: open.c,v 1.18 1999/03/26 03:16:15 simonb Exp $ */
 
 /*-
  * Copyright (c) 1993
@@ -130,7 +130,7 @@
        }
        error = besterror;
 
-       if ((f->f_flags & F_NODEV) == 0)
+       if ((f->f_flags & F_NODEV) == 0 && f->f_dev->dv_close != NULL)
                f->f_dev->dv_close(f);
 err:
        f->f_flags = 0;



Home | Main Index | Thread Index | Old Index