From 173c834fc8f5ae3a6651ee06e87bd09bddb76346 Mon Sep 17 00:00:00 2001 From: Juan RP Date: Sun, 23 Jun 2019 11:05:03 +0200 Subject: [PATCH] lib/pkgdb.c: initialize pkgdb_fd. otherwise xbps_pkgdb_unlock will always succeed. --- lib/pkgdb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/pkgdb.c b/lib/pkgdb.c index 3264a0f0..6d7e8f9d 100644 --- a/lib/pkgdb.c +++ b/lib/pkgdb.c @@ -57,7 +57,7 @@ * data type is specified on its edge, i.e array, bool, integer, string, * dictionary. */ -static int pkgdb_fd; +static int pkgdb_fd = -1; int xbps_pkgdb_lock(struct xbps_handle *xhp)