transaction: modernize transaction_free()
This commit is contained in:
@@ -1199,8 +1199,12 @@ Transaction *transaction_new(bool irreversible) {
|
||||
return tr;
|
||||
}
|
||||
|
||||
void transaction_free(Transaction *tr) {
|
||||
Transaction *transaction_free(Transaction *tr) {
|
||||
if (!tr)
|
||||
return NULL;
|
||||
|
||||
assert(hashmap_isempty(tr->jobs));
|
||||
hashmap_free(tr->jobs);
|
||||
free(tr);
|
||||
|
||||
return mfree(tr);
|
||||
}
|
||||
|
||||
@@ -16,7 +16,7 @@ struct Transaction {
|
||||
};
|
||||
|
||||
Transaction *transaction_new(bool irreversible);
|
||||
void transaction_free(Transaction *tr);
|
||||
Transaction *transaction_free(Transaction *tr);
|
||||
|
||||
void transaction_add_propagate_reload_jobs(Transaction *tr, Unit *unit, Job *by, bool ignore_order, sd_bus_error *e);
|
||||
int transaction_add_job_and_dependencies(
|
||||
|
||||
Reference in New Issue
Block a user