From adf60e26ce6e44bbd55d69926ab4a450bac59493 Mon Sep 17 00:00:00 2001 From: Eric Curtin Date: Thu, 8 Jun 2023 14:10:16 +0100 Subject: [PATCH] Fix read_proc_cmdline_key ("ot-composefs") memory leak Make it an autofree_char rather than a char --- src/switchroot/ostree-prepare-root.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/switchroot/ostree-prepare-root.c b/src/switchroot/ostree-prepare-root.c index d7b44d9b..dcb91431 100644 --- a/src/switchroot/ostree-prepare-root.c +++ b/src/switchroot/ostree-prepare-root.c @@ -246,7 +246,7 @@ main (int argc, char *argv[]) } OstreeComposefsMode composefs_mode = OSTREE_COMPOSEFS_MODE_MAYBE; - char *ot_composefs = read_proc_cmdline_key ("ot-composefs"); + autofree char *ot_composefs = read_proc_cmdline_key ("ot-composefs"); char *composefs_digest = NULL; if (ot_composefs) { -- 2.30.2