[PATCH 10/15] dm table split_args: handle no input

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: David Teigland <[email protected]>

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

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 [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux