Build failure: don't unlock memory unless we have mlock!
authormdw <mdw>
Sat, 5 Mar 2005 16:44:44 +0000 (16:44 +0000)
committermdw <mdw>
Sat, 5 Mar 2005 16:44:44 +0000 (16:44 +0000)
lmem.c

diff --git a/lmem.c b/lmem.c
index ed79630..5c36e98 100644 (file)
--- 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*/
 }