diff options
author | Jeff King <peff@peff.net> | 2012-09-01 07:34:09 -0400 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2012-09-02 21:10:24 -0700 |
commit | ba4d1c7b1623b2c7ec198aee08036acf779375e6 (patch) | |
tree | b4b74223af622272dc6026818848d48cad2faf81 /argv-array.c | |
parent | fe4a0a288842e225f99254b3e6ce14ff98875501 (diff) | |
download | git-ba4d1c7b1623b2c7ec198aee08036acf779375e6.tar.gz |
argv-array: fix bogus cast when freeing array
Since the array struct stores a "const char **" argv member
(for compatibility with most of our argv-taking functions),
we have to cast away the const-ness when freeing its
elements.
However, we used the wrong type when doing so. It doesn't
make a difference since free() take a void pointer anyway,
but it can be slightly confusing to a reader.
Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'argv-array.c')
-rw-r--r-- | argv-array.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/argv-array.c b/argv-array.c index 55e8443ff9..256741d226 100644 --- a/argv-array.c +++ b/argv-array.c @@ -63,7 +63,7 @@ void argv_array_clear(struct argv_array *array) if (array->argv != empty_argv) { int i; for (i = 0; i < array->argc; i++) - free((char **)array->argv[i]); + free((char *)array->argv[i]); free(array->argv); } argv_array_init(array); |