[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>
This commit is contained in:
parent
ce503f59ae
commit
814d68629b
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user