summaryrefslogtreecommitdiff
path: root/src/libs6rcd/s6rc_db_free.c
blob: 07f4ccda30b1c0bec28f34c53bb2d8d4de581ba3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
/* ISC license. */

#include <errno.h>

#include <skalibs/alloc.h>

#include "db.h"

void s6rc_db_free (s6rc_db_t *db)
{
  int e = errno ;
  alloc_free(db->argvs) ;
  munmap(db->map, db->size) ;
  db->map = 0 ;
  errno = e ;
}