diff options
author | David Teigland <teigland@redhat.com> | 2006-06-26 00:27:31 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-06-26 09:58:36 -0700 |
commit | 814d68629b40e863997fa0eea459be4cc99a06cc (patch) | |
tree | 85dddcb7d8c1885a2af45aa4be36b0b78a4c7ddd /drivers | |
parent | ce503f59ae899c3e75a8a1cf46f2d44c0c5b5c7c (diff) | |
download | linux-stable-814d68629b40e863997fa0eea459be4cc99a06cc.tar.gz linux-stable-814d68629b40e863997fa0eea459be4cc99a06cc.tar.bz2 linux-stable-814d68629b40e863997fa0eea459be4cc99a06cc.zip |
[PATCH] dm table split_args: handle no input
Return sense if dm_split_args is called with a NULL input parameter.
Signed-off-by: David Teigland <teigland@redhat.com>
Signed-off-by: Alasdair G Kergon <agk@redhat.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/md/dm-table.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/md/dm-table.c b/drivers/md/dm-table.c index b6183eda8106..10c9439635ca 100644 --- a/drivers/md/dm-table.c +++ b/drivers/md/dm-table.c @@ -590,6 +590,12 @@ int dm_split_args(int *argc, char ***argvp, char *input) unsigned array_size = 0; *argc = 0; + + if (!input) { + *argvp = NULL; + return 0; + } + argv = realloc_argv(&array_size, argv); if (!argv) return -ENOMEM; |