nserver

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | LICENSE

commit 0e0bc28ea8cc29b8b9c8b6a85ffc3fbf888ace4b
parent 905c494ec1250287d2cd6d91bc1c64b50bb44a63
Author: rsiddharth <s@ricketyspace.net>
Date:   Tue, 14 Apr 2020 20:51:21 -0400

nserver: Update db_load.

* nserver/src/db.c (db_load): close gdbm.

Diffstat:
nserver/src/db.c | 4++++
1 file changed, 4 insertions(+), 0 deletions(-)

diff --git a/nserver/src/db.c b/nserver/src/db.c @@ -114,6 +114,10 @@ char *db_load(char *key) datum v_datum = gdbm_fetch(gf, *k_datum); check(v_datum.dptr != NULL, "key not found"); + // close db + rc = gdbm_close(gf); + check(rc == 0, "gdbm close failed"); + // clean up. free(k_datum);