mirror of
https://github.com/loot/libloot.git
synced 2026-07-27 14:16:01 -07:00
Remove unnecessary memory handling.
It all gets cleaned up when the GitHandler object goes out of scope anyway.
This commit is contained in:
@@ -169,14 +169,6 @@ namespace loot {
|
||||
payload.fileToFind = filename.c_str();
|
||||
git.Call(git_diff_foreach(git.diff, &git.diff_file_cb, NULL, NULL, NULL, &payload));
|
||||
|
||||
// Clean up memory
|
||||
git_object_free(git.obj);
|
||||
git.obj = nullptr;
|
||||
git_tree_free(git.tree);
|
||||
git.tree = nullptr;
|
||||
git_diff_free(git.diff);
|
||||
git.diff = nullptr;
|
||||
|
||||
return payload.fileFound;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -76,10 +76,6 @@ namespace loot {
|
||||
out << boost::locale::as::ftime("%Y-%m-%d") << dateTime;
|
||||
info.date = out.str();
|
||||
|
||||
// Free object memory.
|
||||
git_object_free(git.obj);
|
||||
git.obj = nullptr;
|
||||
|
||||
BOOST_LOG_TRIVIAL(trace) << "Diffing masterlist HEAD and working copy.";
|
||||
if (IsFileDifferent(path.parent_path(), path.filename().string())) {
|
||||
info.revision += string(" ") + lc::translate("(edited)").str();
|
||||
|
||||
Reference in New Issue
Block a user