Whamcloud - gitweb
fuse2fs: fix CLI argument parsing leaks
authorDarrick J. Wong <djwong@kernel.org>
Wed, 21 May 2025 22:37:15 +0000 (15:37 -0700)
committerTheodore Ts'o <tytso@mit.edu>
Fri, 23 May 2025 13:36:19 +0000 (09:36 -0400)
Fix some memory leaks in the argument parser.

Signed-off-by: Darrick J. Wong <djwong@kernel.org>
Link: https://lore.kernel.org/r/174786677711.1383760.4278826288377195178.stgit@frogsfrogsfrogs
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
misc/fuse2fs.c

index 39f9f2d..2d4ea61 100644 (file)
@@ -4176,6 +4176,9 @@ out:
                        com_err(argv[0], err, "while closing fs");
                global_fs = NULL;
        }
+       if (fctx.device)
+               free(fctx.device);
+       fuse_opt_free_args(&args);
        return ret;
 }