mirror of
https://github.com/systemd/systemd.git
synced 2024-12-23 21:35:11 +03:00
transaction: introduce transaction_abort_and_free()
Will be used in following commits.
This commit is contained in:
parent
12da8805e7
commit
542fe40845
@ -1208,3 +1208,12 @@ Transaction *transaction_free(Transaction *tr) {
|
||||
|
||||
return mfree(tr);
|
||||
}
|
||||
|
||||
Transaction *transaction_abort_and_free(Transaction *tr) {
|
||||
if (!tr)
|
||||
return NULL;
|
||||
|
||||
transaction_abort(tr);
|
||||
|
||||
return transaction_free(tr);
|
||||
}
|
||||
|
@ -17,6 +17,8 @@ struct Transaction {
|
||||
|
||||
Transaction *transaction_new(bool irreversible);
|
||||
Transaction *transaction_free(Transaction *tr);
|
||||
Transaction *transaction_abort_and_free(Transaction *tr);
|
||||
DEFINE_TRIVIAL_CLEANUP_FUNC(Transaction*, transaction_abort_and_free);
|
||||
|
||||
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(
|
||||
|
Loading…
Reference in New Issue
Block a user