hc
2024-10-16 50a212ec906f7524620675f0c57357691c26c81f
kernel/security/apparmor/policy_ns.c
....@@ -1,3 +1,4 @@
1
+// SPDX-License-Identifier: GPL-2.0-only
12 /*
23 * AppArmor security module
34 *
....@@ -5,11 +6,6 @@
56 *
67 * Copyright (C) 1998-2008 Novell/SUSE
78 * Copyright 2009-2017 Canonical Ltd.
8
- *
9
- * This program is free software; you can redistribute it and/or
10
- * modify it under the terms of the GNU General Public License as
11
- * published by the Free Software Foundation, version 2 of the
12
- * License.
139 *
1410 * AppArmor policy namespaces, allow for different sets of policies
1511 * to be loaded for tasks within the namespace.
....@@ -125,9 +121,9 @@
125121 return ns;
126122
127123 fail_unconfined:
128
- kzfree(ns->base.hname);
124
+ aa_policy_destroy(&ns->base);
129125 fail_ns:
130
- kzfree(ns);
126
+ kfree_sensitive(ns);
131127 return NULL;
132128 }
133129
....@@ -149,7 +145,7 @@
149145
150146 ns->unconfined->ns = NULL;
151147 aa_free_profile(ns->unconfined);
152
- kzfree(ns);
148
+ kfree_sensitive(ns);
153149 }
154150
155151 /**