chiark
/
gitweb
/
~mdw
/
catacomb
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
1256557
)
Build failure: don't unlock memory unless we have mlock!
author
mdw
<mdw>
Sat, 5 Mar 2005 16:44:44 +0000
(16:44 +0000)
committer
mdw
<mdw>
Sat, 5 Mar 2005 16:44:44 +0000
(16:44 +0000)
lmem.c
patch
|
blob
|
blame
|
history
diff --git
a/lmem.c
b/lmem.c
index ed796306faac36c641edaff2721ecd94cc49908d..5c36e98919b062b54bf8e8afd97e1b0b6118ea01 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*/
}