]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
gpt-auto-generator: fix memory leak
authorAntonio Alvarez Feijoo <antonio.feijoo@suse.com>
Fri, 4 Apr 2025 09:18:18 +0000 (11:18 +0200)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Fri, 4 Apr 2025 11:02:02 +0000 (20:02 +0900)
Follow-up for 74cfd0921c01c464b79548467e909e577bfc25ac

src/gpt-auto-generator/gpt-auto-generator.c

index b10dd44c9d656279a80df12051e8d03bd811f1b3..5274f81e300f3e9760983cb093d1bc90d702d621 100644 (file)
@@ -60,11 +60,12 @@ static char *arg_usr_options = NULL;
 static ImagePolicy *arg_image_policy = NULL;
 static ImageFilter *arg_image_filter = NULL;
 
-STATIC_DESTRUCTOR_REGISTER(arg_image_policy, image_policy_freep);
 STATIC_DESTRUCTOR_REGISTER(arg_root_fstype, freep);
 STATIC_DESTRUCTOR_REGISTER(arg_root_options, freep);
 STATIC_DESTRUCTOR_REGISTER(arg_usr_fstype, freep);
 STATIC_DESTRUCTOR_REGISTER(arg_usr_options, freep);
+STATIC_DESTRUCTOR_REGISTER(arg_image_policy, image_policy_freep);
+STATIC_DESTRUCTOR_REGISTER(arg_image_filter, image_filter_freep);
 
 #define LOADER_PARTITION_IDLE_USEC (120 * USEC_PER_SEC)