From d51cfe0fc4547f99c4ac571a754b5bd13e68103f Mon Sep 17 00:00:00 2001 From: Brian Barrett Date: Tue, 7 Dec 2004 03:17:22 +0000 Subject: [PATCH] * duh. fix previous commit so that we don't free NULL pointers and all that This commit was SVN r3724. --- src/util/argv.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/util/argv.c b/src/util/argv.c index 6a0b8c1c92..5fcdb9fce3 100644 --- a/src/util/argv.c +++ b/src/util/argv.c @@ -292,18 +292,18 @@ int ompi_argv_delete(int *argc, char ***argv, int start, int num_to_delete) /* Free all items that are being deleted */ for (i = start; i < count && i < start + num_to_delete; ++i) { - free(*argv[i]); + free((*argv)[i]); } /* Copy the suffix over the deleted items */ for (i = start; i < start + suffix_count; ++i) { - *argv[i] = *argv[i + num_to_delete]; + (*argv)[i] = (*argv)[i + num_to_delete]; } /* Add the trailing NULL */ - *argv[i] = NULL; + (*argv)[i] = NULL; /* adjust the argv array */ tmp = realloc(*argv, sizeof(char**) * (i + 1));