]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
tree-wide: convert some more mfree() candidates
authorDaniel Mack <daniel@zonque.org>
Mon, 3 Aug 2015 17:26:07 +0000 (19:26 +0200)
committerDaniel Mack <daniel@zonque.org>
Mon, 3 Aug 2015 17:39:42 +0000 (19:39 +0200)
src/basic/cgroup-util.c
src/firstboot/firstboot.c

index 34a30605092abdc980776c2686e675e9f0b80317..6b3162a35fc0b6e5cc089e75f2fc9d30b4622ddb 100644 (file)
@@ -826,14 +826,12 @@ int cg_install_release_agent(const char *controller, const char *agent) {
         } else if (!streq(sc, agent))
                 return -EEXIST;
 
-        free(fs);
-        fs = NULL;
+        fs = mfree(fs);
         r = cg_get_path(controller, NULL, "notify_on_release", &fs);
         if (r < 0)
                 return r;
 
-        free(contents);
-        contents = NULL;
+        contents = mfree(contents);
         r = read_one_line_file(fs, &contents);
         if (r < 0)
                 return r;
@@ -865,8 +863,7 @@ int cg_uninstall_release_agent(const char *controller) {
         if (r < 0)
                 return r;
 
-        free(fs);
-        fs = NULL;
+        fs = mfree(fs);
 
         r = cg_get_path(controller, NULL, "release_agent", &fs);
         if (r < 0)
index 05f1ae2646dcea88d7a37069a896d89f5f910264..c526a85b056f3a338584be60dbd5c484098b33d0 100644 (file)
@@ -763,8 +763,7 @@ static int parse_argv(int argc, char *argv[]) {
                         break;
 
                 case ARG_ROOT_PASSWORD_FILE:
-                        free(arg_root_password);
-                        arg_root_password  = NULL;
+                        arg_root_password = mfree(arg_root_password);
 
                         r = read_one_line_file(optarg, &arg_root_password);
                         if (r < 0)