From: Colin Walters Date: Fri, 16 Jun 2023 18:52:53 +0000 (-0400) Subject: composefs: Avoid double unref X-Git-Tag: archive/raspbian/2023.7-3+rpi1~1^2~9^2~1^2~15^2 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=79adccee38afb01d5d410ca61c721aa0ffafde9a;p=ostree.git 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... --- 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;