mirror of
https://github.com/loot/libloot.git
synced 2026-07-27 14:16:01 -07:00
Whoops, was freeing the same memory twice.
This commit is contained in:
@@ -46,10 +46,6 @@ namespace loot {
|
||||
git_handler() : repo(nullptr), remote(nullptr), cfg(nullptr), obj(nullptr), commit(nullptr), ref(nullptr), sig(nullptr), blob(nullptr) {}
|
||||
|
||||
~git_handler() {
|
||||
free();
|
||||
}
|
||||
|
||||
void free() {
|
||||
git_commit_free(commit);
|
||||
git_object_free(obj);
|
||||
git_config_free(cfg);
|
||||
@@ -70,7 +66,6 @@ namespace loot {
|
||||
error_message = to_string(error_code) + ".";
|
||||
else
|
||||
error_message = to_string(error_code) + "; " + last_error->message;
|
||||
free();
|
||||
giterr_clear();
|
||||
|
||||
if (ui_message.empty())
|
||||
@@ -172,11 +167,9 @@ namespace loot {
|
||||
out << boost::locale::as::ftime("%Y-%m-%d") << dateTime;
|
||||
date = out.str();
|
||||
|
||||
git.free();
|
||||
return pair<string, string>(revision, date);
|
||||
}
|
||||
else {
|
||||
git.free();
|
||||
return pair<string, string>("Unknown: Masterlist edited", "Unknown: Masterlist edited");
|
||||
}
|
||||
}
|
||||
@@ -345,9 +338,6 @@ namespace loot {
|
||||
}
|
||||
} while (parsingFailed);
|
||||
|
||||
//Finally, free memory.
|
||||
git.free();
|
||||
|
||||
return pair<string, string>(revision, date);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user