Skip to content

Commit

Permalink
[PATCH] dm table split_args: handle no input
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
David Teigland authored and Linus Torvalds committed Jun 26, 2006
1 parent ce503f5 commit 814d686
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions drivers/md/dm-table.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 814d686

Please sign in to comment.