Commit Diff
Diff:
3010817a07f53089dc7650df2ab0032c5877f272
bf583bd16caeb1f659eca2629e99aa9a620e4bd9
Commit:
bf583bd16caeb1f659eca2629e99aa9a620e4bd9
Tree:
7c14f61726391eec6fbd07828a1a4ec21ed13fe9
Author:
pjp <pjp@delphinusdns.org>
Committer:
pjp <pjp@delphinusdns.org>
Date:
Mon Jul 27 08:21:08 2020 UTC
Message:
remove more data inside the database upon expire_db(), this should make it clean. Free the *db upon dddbclose() time.
blob - 7fc55e2cfe7db8436da68cd6fb292d7dc0bd7e2f
blob + b55a09ed11412d94527b89c5d673c8667f6b56ca
--- db.c
+++ db.c
@@ -27,7 +27,7 @@
*/
/*
- * $Id: db.c,v 1.23 2020/07/15 20:27:15 pjp Exp $
+ * $Id: db.c,v 1.24 2020/07/27 08:21:08 pjp Exp $
*/
#include <sys/types.h>
@@ -173,6 +173,7 @@ dddbget(ddDB *db, ddDBT *key, ddDBT *data)
int
dddbclose(ddDB *db)
{
+ free (db);
return 0;
}
@@ -426,6 +427,9 @@ expire_db(ddDB *db, int all)
totalcount += count;
}
+
+ RB_REMOVE(domaintree, &db->head, walk);
+ free(walk);
}
return (totalcount);
repomaster@centroid.eu