From: Mike Pall Date: Wed, 1 Feb 2012 17:21:12 +0000 (+0100) Subject: FFI: Fix library unloading on POSIX systems. X-Git-Tag: v2.0.0-beta10~53 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d72d758a112cd4a83402f4debfe5173ba170c6c2;p=thirdparty%2FLuaJIT.git FFI: Fix library unloading on POSIX systems. --- diff --git a/src/lj_clib.c b/src/lj_clib.c index ec889e51..a716254d 100644 --- a/src/lj_clib.c +++ b/src/lj_clib.c @@ -114,7 +114,7 @@ static void *clib_loadlib(lua_State *L, const char *name, int global) static void clib_unloadlib(CLibrary *cl) { - if (!cl->handle && cl->handle != CLIB_DEFHANDLE) + if (cl->handle && cl->handle != CLIB_DEFHANDLE) dlclose(cl->handle); }