mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
git access: add proper cleanup function for git_info
We had various random "free parts of the git info" left-overs from when we passed down the git repo data ad-hoc. Get rid of it, and replace it with just doing a 'cleanup_git_info()' that does the final cleanup of it all. Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
parent
96337dbbcf
commit
e33680c336
9 changed files with 28 additions and 15 deletions
|
@ -826,8 +826,11 @@ int save_dives_logic(const char *filename, const bool select_only, bool anonymiz
|
|||
FILE *f;
|
||||
int error = 0;
|
||||
|
||||
if (is_git_repository(filename, &info))
|
||||
return git_save_dives(&info, select_only);
|
||||
if (is_git_repository(filename, &info)) {
|
||||
error = git_save_dives(&info, select_only);
|
||||
cleanup_git_info(&info);
|
||||
return error;
|
||||
}
|
||||
|
||||
save_dives_buffer(&buf, select_only, anonymize);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue