Source-Changes-HG archive

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

[src/trunk]: src/sys/modules/lua Can't destroy pb until we're done using it.



details:   https://anonhg.NetBSD.org/src/rev/96518ea1a548
branches:  trunk
changeset: 352972:96518ea1a548
user:      riastradh <riastradh%NetBSD.org@localhost>
date:      Sun Apr 16 17:45:12 2017 +0000

description:
Can't destroy pb until we're done using it.

diffstat:

 sys/modules/lua/lua.c |  4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diffs (19 lines):

diff -r 9bae2d30c51f -r 96518ea1a548 sys/modules/lua/lua.c
--- a/sys/modules/lua/lua.c     Sun Apr 16 17:18:54 2017 +0000
+++ b/sys/modules/lua/lua.c     Sun Apr 16 17:45:12 2017 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: lua.c,v 1.19 2017/01/20 12:25:07 maya Exp $ */
+/*     $NetBSD: lua.c,v 1.20 2017/04/16 17:45:12 riastradh Exp $ */
 
 /*
  * Copyright (c) 2014 by Lourival Vieira Neto <lneto%NetBSD.org@localhost>.
@@ -401,8 +401,8 @@
                                if (pb == NULL)
                                        return ENOMEM;
                                NDINIT(&nd, LOOKUP, FOLLOW | NOCHROOT, pb);
+                               error = vn_open(&nd, FREAD, 0);
                                pathbuf_destroy(pb);
-                               error = vn_open(&nd, FREAD, 0);
                                if (error) {
                                        if (lua_verbose)
                                                device_printf(sc->sc_dev,



Home | Main Index | Thread Index | Old Index