Messages in this thread Patch in this message | | | Date | Wed, 21 Jun 2006 20:36:09 +0100 | From | Alasdair G Kergon <> | Subject | [PATCH 10/15] dm table split_args: handle no input |
| |
From: David Teigland <teigland@redhat.com>
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>
Index: linux-2.6.17/drivers/md/dm-table.c =================================================================== --- linux-2.6.17.orig/drivers/md/dm-table.c 2006-06-21 16:19:33.000000000 +0100 +++ linux-2.6.17/drivers/md/dm-table.c 2006-06-21 17:17:58.000000000 +0100 @@ -590,6 +590,12 @@ int dm_split_args(int *argc, char ***arg unsigned array_size = 0; *argc = 0; + + if (!input) { + *argvp = NULL; + return 0; + } + argv = realloc_argv(&array_size, argv); if (!argv) return -ENOMEM; - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |