From: David Teigland Date: Mon, 26 Jun 2006 07:27:31 +0000 (-0700) Subject: [PATCH] dm table split_args: handle no input X-Git-Tag: v2.6.18-rc1~654 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=814d68629b40e863997fa0eea459be4cc99a06cc;p=linux-2.6 [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 Signed-off-by: Alasdair G Kergon Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/drivers/md/dm-table.c b/drivers/md/dm-table.c index b6183eda81..10c9439635 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;