mirror of
https://gitlab.freedesktop.org/dbus/dbus.git
synced 2026-01-14 21:50:26 +01:00
activation test: don't crash if AppArmor is built but unavailable
Also don't try to clean up a process we didn't start. Bug: https://bugs.freedesktop.org/show_bug.cgi?id=98666 Signed-off-by: Simon McVittie <smcv@debian.org> Reviewed-by: Philip Withnall <philip.withnall@collabora.co.uk>
This commit is contained in:
parent
6dd92fd825
commit
ca2cdab866
1 changed files with 9 additions and 3 deletions
|
|
@ -801,9 +801,15 @@ teardown (Fixture *f,
|
|||
f->activated = NULL;
|
||||
}
|
||||
|
||||
test_kill_pid (f->daemon_pid);
|
||||
g_spawn_close_pid (f->daemon_pid);
|
||||
test_main_context_unref (f->ctx);
|
||||
if (f->daemon_pid != 0)
|
||||
{
|
||||
test_kill_pid (f->daemon_pid);
|
||||
g_spawn_close_pid (f->daemon_pid);
|
||||
}
|
||||
|
||||
if (f->ctx != NULL)
|
||||
test_main_context_unref (f->ctx);
|
||||
|
||||
g_free (f->address);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue