core/unit: add one assertion for u->manager
authorMike Yuan <me@yhndnzj.com>
Sat, 22 Jun 2024 10:08:39 +0000 (12:08 +0200)
committerLuca Boccassi <bluca@debian.org>
Sun, 21 Jul 2024 11:43:51 +0000 (12:43 +0100)
src/core/unit.c

index 2d750b7ef482ba54e02f9d476ae454a67781963e..be29a4d9ef0ffab81ed61ca6764b7ee38fcb38a4 100644 (file)
@@ -6088,6 +6088,7 @@ int unit_test_trigger_loaded(Unit *u) {
 
 void unit_destroy_runtime_data(Unit *u, const ExecContext *context) {
         assert(u);
+        assert(u->manager);
         assert(context);
 
         /* EXEC_PRESERVE_RESTART is handled via unit_release_resources()! */