From: Junio C Hamano Date: Sat, 20 Jun 2015 17:28:53 GMT Subject: Re: [PATCH v6 18/19] fsck: git receive-pack: support excluding objects from fsck'ing Message-ID: In-Reply-To: <9b7c42e6ec81fd70015b8fe9ff2bd137@www.dscho.org> Johannes Schindelin writes: > There is a problem, though: `git_config_pathname()` accepts a > `const char **` parameter to set the path, yet I need to `free()` > that pointer afterwards because it has been obtained through > `expand_user_path()` which detaches that buffer from a `strbuf`. "I have 'const char *' because I do not ever change the string myself after getting it from an API function, but free() does not want to free a const pointer" occurs sometimes in our codebase and it is OK to cast the constness away (many callsites to free() already do so).