changeset 20:85a22b9abaec

pasterd-clean: proper open/close database
author David Demelier <markand@malikania.fr>
date Thu, 06 Feb 2020 16:08:26 +0100
parents 3aef43b40f1c
children 21c103c33ac9
files pasterd-clean.c
diffstat 1 files changed, 3 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/pasterd-clean.c	Thu Feb 06 20:10:00 2020 +0100
+++ b/pasterd-clean.c	Thu Feb 06 16:08:26 2020 +0100
@@ -56,6 +56,9 @@
 
 	if (!path[0])
 		die("abort: no database specified");
+	if (!database_open(path))
+		die("abort: could not open database");
 
 	database_clear();
+	database_finish();
 }