]> git.ipfire.org Git - pakfire.git/commitdiff
pakfire: Initialize the directory file descriptor
authorMichael Tremer <michael.tremer@ipfire.org>
Wed, 5 Feb 2025 10:18:11 +0000 (10:18 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Wed, 5 Feb 2025 10:18:11 +0000 (10:18 +0000)
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
src/pakfire/pakfire.c

index 7ef5f3edaad7954e2687c3bb77ca318d9c291a70..c58f9241e1e1ec9e24ba507766193a4b58c1156c 100644 (file)
@@ -1026,6 +1026,9 @@ int pakfire_create(struct pakfire** pakfire, struct pakfire_ctx* ctx,
        // Store a reference to the configuration
        p->config = pakfire_config_ref(config);
 
+       // Initialize file descriptors
+       p->fd = -EBADF;
+
        // Store the nominal architecture
        r = pakfire_string_set(p->arches.nominal, arch);
        if (r < 0)