From 8ada1c88b5f8a714394d67f03667e23406cba6e5 Mon Sep 17 00:00:00 2001 From: riastradh Date: Sun, 16 Apr 2017 17:45:12 +0000 Subject: Can't destroy pb until we're done using it. --- sys/modules/lua/lua.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'sys/modules/lua/lua.c') diff --git a/sys/modules/lua/lua.c b/sys/modules/lua/lua.c index 7d574f5df13..37a32a59700 100644 --- a/sys/modules/lua/lua.c +++ b/sys/modules/lua/lua.c @@ -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 . @@ -401,8 +401,8 @@ luaioctl(dev_t dev, u_long cmd, void *data, int flag, struct lwp *l) if (pb == NULL) return ENOMEM; NDINIT(&nd, LOOKUP, FOLLOW | NOCHROOT, pb); - pathbuf_destroy(pb); error = vn_open(&nd, FREAD, 0); + pathbuf_destroy(pb); if (error) { if (lua_verbose) device_printf(sc->sc_dev, -- cgit