On Thu, Mar 31, 2016 at 3:59 PM, Stefan Beller wrote:
>
> Further checking reveals any caller uses it with
>
> desired= xstrdup(absolute_path(my_argument));
>
> We are loosing memory of the strbuf here. so if I we'd
> take the diff above we can also get rid of all the xstrdups
> at the callers
On Thu, Mar 31, 2016 at 3:26 PM, Junio C Hamano wrote:
> Stefan Beller writes:
>
>> + if (!is_absolute_path(sm_gitdir)) {
>> + char *cwd = xgetcwd();
>> + strbuf_addf(&sb, "%s/%s", cwd, sm_gitdir);
>> + sm_gitdir = strbuf_detach(&sb, 0);
>> + fr
Stefan Beller writes:
> + if (!is_absolute_path(sm_gitdir)) {
> + char *cwd = xgetcwd();
> + strbuf_addf(&sb, "%s/%s", cwd, sm_gitdir);
> + sm_gitdir = strbuf_detach(&sb, 0);
> + free(cwd);
It would be surprising that this would be the first co
When giving relative paths to `relative_path` to compute a relative path
from one directory to another, this may fail in `relative_path`.
Make sure both arguments to `relative_path` are always absolute.
Signed-off-by: Stefan Beller
---
Notes:
Notice how the 2 relative path calls
relati
4 matches
Mail list logo