From: Eric Curtin Date: Thu, 8 Jun 2023 13:10:16 +0000 (+0100) Subject: Fix read_proc_cmdline_key ("ot-composefs") memory leak X-Git-Tag: archive/raspbian/2023.7-3+rpi1~1^2~9^2~1^2~25^2 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=adf60e26ce6e44bbd55d69926ab4a450bac59493;p=ostree.git Fix read_proc_cmdline_key ("ot-composefs") memory leak Make it an autofree_char rather than a char --- 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) {