mirror of
https://github.com/subsurface/subsurface.git
synced 2025-01-19 14:25:27 +00:00
Fix potential leak of branch in is_git_repository
Signed-off-by: Anton Lundin <glance@acc.umu.se> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
1a8e8be3a9
commit
f58bc011a7
1 changed files with 1 additions and 0 deletions
|
@ -1093,6 +1093,7 @@ struct git_repository *is_git_repository(const char *filename, const char **bran
|
|||
|
||||
if (stat(loc, &st) < 0 || !S_ISDIR(st.st_mode)) {
|
||||
free(loc);
|
||||
free(branch);
|
||||
return dummy_git_repository;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue