service: correctly roll-back state on exception (bad_alloc).
authorDavin McCall <davmac@davmac.org>
Mon, 2 Jul 2018 16:26:26 +0000 (17:26 +0100)
committerDavin McCall <davmac@davmac.org>
Mon, 2 Jul 2018 18:24:34 +0000 (19:24 +0100)
commit6c5fdac5b534cf483ad382a5c13ca4801ba4ba7c
tree48dad75eaeec7b3078dc1a57f8aeaaf43dd83859
parent0ad34d9fbb44b13f63056c3ec8020dfeb49582fc
service: correctly roll-back state on exception (bad_alloc).

Since a service adds its dependencies to other services' dependents
lists, it needs to roll back those changes if failing due to a bad_alloc
(or other exception).
src/includes/service.h