diff options
Diffstat (limited to 'src/libs6rcd/s6rc_db_free.c')
-rw-r--r-- | src/libs6rcd/s6rc_db_free.c | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/src/libs6rcd/s6rc_db_free.c b/src/libs6rcd/s6rc_db_free.c index b8eb54e..07f4ccd 100644 --- a/src/libs6rcd/s6rc_db_free.c +++ b/src/libs6rcd/s6rc_db_free.c @@ -1,18 +1,16 @@ /* ISC license. */ +#include <errno.h> + #include <skalibs/alloc.h> #include "db.h" void s6rc_db_free (s6rc_db_t *db) { - alloc_free(db->storage) ; + int e = errno ; alloc_free(db->argvs) ; - alloc_free(db->producers) ; - alloc_free(db->deptypes[0]) ; - alloc_free(db->deps[0]) ; - alloc_free(db->bundles) ; - alloc_free(db->externals) ; - alloc_free(db->oneshots) ; - alloc_free(db->longruns) ; + munmap(db->map, db->size) ; + db->map = 0 ; + errno = e ; } |