]> git.ipfire.org Git - pakfire.git/commitdiff
oci: Take the directly passed context
authorMichael Tremer <michael.tremer@ipfire.org>
Sun, 29 Jun 2025 13:38:38 +0000 (13:38 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Sun, 29 Jun 2025 13:38:38 +0000 (13:38 +0000)
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
src/pakfire/oci.c

index 28608ecd1cfaeb813f8046f23480e7ee9dec7073..5128f41ff3c608b6a8437e8106ae629efec173d1 100644 (file)
@@ -557,7 +557,7 @@ ERROR:
 
 int pakfire_oci_mkimage(pakfire_ctx* ctx, pakfire_root* root, FILE* f) {
        struct pakfire_oci_writer writer = {
-               .ctx  = pakfire_root_get_ctx(root),
+               .ctx  = ctx,
                .root = root,
        };
        int r;
@@ -630,8 +630,6 @@ ERROR:
                json_object_put(writer.config);
        if (writer.image)
                pakfire_archive_writer_unref(writer.image);
-       if (writer.ctx)
-               pakfire_ctx_unref(writer.ctx);
        if (writer.diffid)
                free(writer.diffid);