From 1babd9c4f33cb9d6ff01ea694cac1bc39b0d3381 Mon Sep 17 00:00:00 2001 From: mdw Date: Sat, 5 Mar 2005 16:44:44 +0000 Subject: [PATCH] Build failure: don't unlock memory unless we have mlock! --- lmem.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lmem.c b/lmem.c index ed79630..5c36e98 100644 --- a/lmem.c +++ b/lmem.c @@ -307,9 +307,11 @@ void l_destroy(lmem *lm) } memset(lm->p, 0, lm->sz); +#ifdef HAVE_MLOCK if (lm->f & LF_LOCKED) munmap(lm->p, lm->sz); else +#endif free(lm->p); /*sic*/ } -- 2.11.0