]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
[master] release seccomp context when finished
authorEvan Hunt <each@isc.org>
Mon, 16 Jun 2014 18:19:40 +0000 (11:19 -0700)
committerEvan Hunt <each@isc.org>
Mon, 16 Jun 2014 18:19:40 +0000 (11:19 -0700)
bin/named/main.c

index 266d84fb36b41b844ee036ae18714776383f7e17..2e2f67b7d39faa53afe5743760f52f4f5b21bccb 100644 (file)
@@ -814,12 +814,17 @@ setup_seccomp() {
                isc_log_write(ns_g_lctx, NS_LOGCATEGORY_GENERAL,
                              NS_LOGMODULE_MAIN, ISC_LOG_WARNING,
                              "libseccomp unable to load filter");
-               return;
+       } else {
+               isc_log_write(ns_g_lctx, NS_LOGCATEGORY_GENERAL,
+                             NS_LOGMODULE_MAIN, ISC_LOG_NOTICE,
+                             "libseccomp sandboxing active");
        }
 
-       isc_log_write(ns_g_lctx, NS_LOGCATEGORY_GENERAL,
-                     NS_LOGMODULE_MAIN, ISC_LOG_NOTICE,
-                     "libseccomp sandboxing active");
+       /*
+        * Release filter in ctx. Filters already loaded are not
+        * affected.
+        */
+       seccomp_release(ctx);
 }
 #endif /* HAVE_LIBSECCOMP */