From 2a21a19d904c34e56e3ab3fe026dbc5658f68925 Mon Sep 17 00:00:00 2001 From: Zdenek Kabelac Date: Sat, 18 Feb 2017 18:49:19 +0100 Subject: [PATCH] commands: fix memleak Keep all allocations 'mempool' allocated for simple cleanup. --- tools/lvmcmdline.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/lvmcmdline.c b/tools/lvmcmdline.c index 26f747680..c30460251 100644 --- a/tools/lvmcmdline.c +++ b/tools/lvmcmdline.c @@ -2519,7 +2519,7 @@ int lvm_run_command(struct cmd_context *cmd, int argc, char **argv) /* each command should start out with sigint flag cleared */ sigint_clear(); - cmd->name = strdup(argv[0]); + cmd->name = dm_pool_strdup(cmd->mem, argv[0]); /* eliminate '-' from all options starting with -- */ for (i = 1; i < argc; i++) { -- 2.43.5