From: Evan Hunt Date: Mon, 16 Jun 2014 18:19:40 +0000 (-0700) Subject: [master] release seccomp context when finished X-Git-Tag: v9.11.0a1~1536 X-Git-Url: http://git.ipfire.org/gitweb/?a=commitdiff_plain;h=940b03cef2ed31aef1c8dfd7d25fa74145311fd7;p=thirdparty%2Fbind9.git [master] release seccomp context when finished --- diff --git a/bin/named/main.c b/bin/named/main.c index 266d84fb36b..2e2f67b7d39 100644 --- a/bin/named/main.c +++ b/bin/named/main.c @@ -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 */