From 79adccee38afb01d5d410ca61c721aa0ffafde9a Mon Sep 17 00:00:00 2001 From: Colin Walters Date: Fri, 16 Jun 2023 14:52:53 -0400 Subject: [PATCH] composefs: Avoid double unref The interaction of `iter_loop` and autofree is way too subtle; I happened to be reading this code and noticed we did the NULL reset in one path but not another. The real fix is Rust... --- src/libostree/ostree-repo-composefs.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/libostree/ostree-repo-composefs.c b/src/libostree/ostree-repo-composefs.c index 330b0cf4..612890d0 100644 --- a/src/libostree/ostree-repo-composefs.c +++ b/src/libostree/ostree-repo-composefs.c @@ -461,6 +461,9 @@ checkout_composefs_recurse (OstreeRepo *self, const char *dirtree_checksum, dname, cancellable, error)) return FALSE; } + /* Freed by iter-loop */ + subdirtree_csum_v = NULL; + subdirmeta_csum_v = NULL; } return TRUE; -- 2.30.2