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/lvm2cmdline.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/lvm2cmdline.h')
-rw-r--r-- | tools/lvm2cmdline.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/lvm2cmdline.h b/tools/lvm2cmdline.h index 48c2c37e7..0073f9025 100644 --- a/tools/lvm2cmdline.h +++ b/tools/lvm2cmdline.h @@ -32,7 +32,7 @@ void *cmdlib_lvm2_init(unsigned static_compile); void lvm_fin(struct cmd_context *cmd); struct cmd_context *init_lvm(unsigned set_connections, unsigned set_filters); -int lvm_register_commands(const char *name); +int lvm_register_commands(struct cmd_context *cmdtool, const char *name); int lvm_split(char *str, int *argc, char **argv, int max); int lvm_run_command(struct cmd_context *cmd, int argc, char **argv); int lvm_return_code(int ret); |