Commit 26533ee6 authored by Andrea Azzarone's avatar Andrea Azzarone 🚴

libtracker-miners-common: Always call seccomp_release

seccomp_release needs to be called both in case of success and in case of
failure. As per documentation any seccomp filters already loaded into the kernel
are not affected.

Closes: GNOME/tracker-miners#59
parent 6b9340eb
......@@ -211,8 +211,11 @@ tracker_seccomp_init (void)
g_debug ("Loading seccomp rules.");
if (seccomp_load (ctx) >= 0)
if (seccomp_load (ctx) >= 0) {
/* Any seccomp filters loaded into the kernel are not affected. */
seccomp_release (ctx);
return TRUE;
g_critical ("Failed to load seccomp rules.");
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment