From 23bfc4b9e8211719e9b379e4c9c42b473017653c Mon Sep 17 00:00:00 2001 From: Philip Withnall Date: Wed, 24 Jun 2026 13:10:35 +0100 Subject: [PATCH] sysupdate: Fix an early return path return value If the FD has already been opened, return 1 as if opening was successful, rather than returning 0 as if it gave `ENOENT`. This fixes doing multiple installdb operations on a single `Context`. Signed-off-by: Philip Withnall --- src/sysupdate/sysupdate-cleanup.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/sysupdate/sysupdate-cleanup.c b/src/sysupdate/sysupdate-cleanup.c index fac2a0b1b3c..74e2a38119e 100644 --- a/src/sysupdate/sysupdate-cleanup.c +++ b/src/sysupdate/sysupdate-cleanup.c @@ -57,7 +57,7 @@ static int context_installdb_acquire_fd(Context *c, bool make) { assert(c); if (c->installdb_fd >= 0) - return 0; + return 1; _cleanup_free_ char *j = NULL; const char *p;