aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/md
diff options
context:
space:
mode:
authorDavid Teigland <teigland@redhat.com>2006-06-26 03:27:31 -0400
committerLinus Torvalds <torvalds@g5.osdl.org>2006-06-26 12:58:36 -0400
commit814d68629b40e863997fa0eea459be4cc99a06cc (patch)
tree85dddcb7d8c1885a2af45aa4be36b0b78a4c7ddd /drivers/md
parentce503f59ae899c3e75a8a1cf46f2d44c0c5b5c7c (diff)
[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/md')
-rw-r--r--drivers/md/dm-table.c6
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)
590 unsigned array_size = 0; 590 unsigned array_size = 0;
591 591
592 *argc = 0; 592 *argc = 0;
593
594 if (!input) {
595 *argvp = NULL;
596 return 0;
597 }
598
593 argv = realloc_argv(&array_size, argv); 599 argv = realloc_argv(&array_size, argv);
594 if (!argv) 600 if (!argv)
595 return -ENOMEM; 601 return -ENOMEM;