mirror of
git://sourceware.org/git/lvm2.git
synced 2024-12-21 13:34:40 +03:00
commands: fix memleak
Keep all allocations 'mempool' allocated for simple cleanup.
This commit is contained in:
parent
87c89ac279
commit
2a21a19d90
@ -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++) {
|
||||
|
Loading…
Reference in New Issue
Block a user