fix: memory leak
This commit is contained in:
parent
530f5a54c8
commit
203d7fee48
1 changed files with 2 additions and 1 deletions
3
XD.c
3
XD.c
|
|
@ -101,7 +101,8 @@ char
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
if (strncmp(fstr, "gitdir: ", strlen("gitdir: ")) == 0) {
|
if (strncmp(fstr, "gitdir: ", strlen("gitdir: ")) == 0) {
|
||||||
return realpath(strndup(fstr + strlen("gitdir: "), strlen(fstr + strlen("gitdir: ")) - 1), NULL);
|
fstr[strlen(fstr) - 1] = '\0';
|
||||||
|
return realpath(fstr + strlen("gitdir: "), NULL);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue