]> Git Repo - linux.git/commitdiff
[PATCH] dm table split_args: handle no input
authorDavid Teigland <[email protected]>
Mon, 26 Jun 2006 07:27:31 +0000 (00:27 -0700)
committerLinus Torvalds <[email protected]>
Mon, 26 Jun 2006 16:58:36 +0000 (09:58 -0700)
Return sense if dm_split_args is called with a NULL input parameter.

Signed-off-by: David Teigland <[email protected]>
Signed-off-by: Alasdair G Kergon <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
drivers/md/dm-table.c

index b6183eda8106e8ac38af19e4c0603632bba073af..10c9439635ca469c541e06eaadd5fc8ba3501b2b 100644 (file)
@@ -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;
This page took 0.053628 seconds and 4 git commands to generate.