]> git.ipfire.org Git - thirdparty/systemd.git/blobdiff - src/cryptsetup/cryptsetup-generator.c
tree-wide: use mfree more
[thirdparty/systemd.git] / src / cryptsetup / cryptsetup-generator.c
index 8ac5ab730afe081d7fc1218ed89a5ff92694352b..de0a3b6f9c19f1ca1cf372ef0b1e2af8af0fccf8 100644 (file)
@@ -264,16 +264,13 @@ static crypto_device *get_crypto_device(const char *uuid) {
                 d->keyfile = d->options = d->name = NULL;
 
                 d->uuid = strdup(uuid);
-                if (!d->uuid) {
-                        free(d);
-                        return NULL;
-                }
+                if (!d->uuid)
+                        return mfree(d);
 
                 r = hashmap_put(arg_disks, d->uuid, d);
                 if (r < 0) {
                         free(d->uuid);
-                        free(d);
-                        return NULL;
+                        return mfree(d);
                 }
         }