mirror of
https://git.proxmox.com/git/libgit2
synced 2025-05-21 14:39:10 +00:00
Don't unload diff data unless loaded
This commit is contained in:
parent
cdbcb8dd80
commit
39a1a66242
@ -417,6 +417,9 @@ int git_diff_file_content__load(git_diff_file_content *fc)
|
||||
|
||||
void git_diff_file_content__unload(git_diff_file_content *fc)
|
||||
{
|
||||
if ((fc->flags & GIT_DIFF_FLAG__LOADED) == 0)
|
||||
return;
|
||||
|
||||
if (fc->flags & GIT_DIFF_FLAG__FREE_DATA) {
|
||||
git__free(fc->map.data);
|
||||
fc->map.data = "";
|
||||
|
Loading…
Reference in New Issue
Block a user