From: Jeff King Date: Sat, 1 Sep 2012 11:34:09 +0000 (-0400) Subject: argv-array: fix bogus cast when freeing array X-Git-Tag: v1.7.12.2~7^2~3 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=ba4d1c7b1623b2c7ec198aee08036acf779375e6;p=git.git 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 Signed-off-by: Junio C Hamano --- diff --git a/argv-array.c b/argv-array.c index 55e8443ff..256741d22 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);