Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

[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>

authored by

David Teigland and committed by
Linus Torvalds
814d6862 ce503f59

+6
+6
drivers/md/dm-table.c
··· 590 590 unsigned array_size = 0; 591 591 592 592 *argc = 0; 593 + 594 + if (!input) { 595 + *argvp = NULL; 596 + return 0; 597 + } 598 + 593 599 argv = realloc_argv(&array_size, argv); 594 600 if (!argv) 595 601 return -ENOMEM;