diff options
author | Oscar Najera <hi@oscarnajera.com> | 2025-06-06 16:48:06 +0200 |
---|---|---|
committer | Oscar Najera <hi@oscarnajera.com> | 2025-06-06 18:27:04 +0200 |
commit | 8b5bfdd64db9ed0b304e67302b41dcb3e5a37df8 (patch) | |
tree | c19090a6460586b548fa06ed5ece3a46278cbbce /geoip | |
parent | 33e67d9f6d2e07bd5e68841484f9e7969ca4d3a6 (diff) | |
download | scratch-8b5bfdd64db9ed0b304e67302b41dcb3e5a37df8.tar.gz scratch-8b5bfdd64db9ed0b304e67302b41dcb3e5a37df8.tar.bz2 scratch-8b5bfdd64db9ed0b304e67302b41dcb3e5a37df8.zip |
close db
Diffstat (limited to 'geoip')
-rw-r--r-- | geoip/ip.lisp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/geoip/ip.lisp b/geoip/ip.lisp index c7b8a77..dfdabc0 100644 --- a/geoip/ip.lisp +++ b/geoip/ip.lisp @@ -272,6 +272,9 @@ (multiple-value-bind (ptr fd size) (mmap:mmap file) (mmap->mmdb file ptr fd size))) +(defun close-mmdb (mmdb) + (with-slots (ptr fd size) mmdb + (mmap:munmap ptr fd size))) (defvar *mmdb* (make-mmdb "GeoLite2-Country.mmdb")) (with-slots (metadata) *mmdb* |