diff options
author | David Teigland <teigland@redhat.com> | 2017-04-28 16:27:19 -0500 |
---|---|---|
committer | David Teigland <teigland@redhat.com> | 2017-05-01 15:27:14 -0500 |
commit | 15eaf703fcfc548ff687a07002f35b06f9fd8c7d (patch) | |
tree | 587911d32a748b9d1f198c2f95a0544fcc295ecb /tools/command.h | |
parent | 54726a4950756b8f0c3e19c4c7d5feb6fb838e00 (diff) | |
download | lvm2-15eaf703fcfc548ff687a07002f35b06f9fd8c7d.tar.gz |
commands: fix memory debug for cmd defs
Clean up the handling of memory used for cmd defs
so it doesn't trip up memory debugging.
Allocate memory for commands[] from libmem.
Free temporary memory used by define_commands()
at the end of the function.
Clear all the command def state in in lvm_fin().
Diffstat (limited to 'tools/command.h')
-rw-r--r-- | tools/command.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/command.h b/tools/command.h index 339863c72..a84e3742c 100644 --- a/tools/command.h +++ b/tools/command.h @@ -255,7 +255,7 @@ struct lv_type { }; -int define_commands(const char *run_name); +int define_commands(struct cmd_context *cmdtool, const char *run_name); int command_id_to_enum(const char *str); void print_usage(struct command *cmd, int longhelp, int desc_first); void print_usage_common_cmd(struct command_name *cname, struct command *cmd); |