Repository navigation
Commit dd89b9d
selinux: do not allocate ancillary buffer on first load
In security_load_policy(), we can defer allocating the newpolicydb
ancillary array to after checking state->initialized, thereby avoiding
the pointless allocation when loading policy the first time.
Signed-off-by: Ondrej Mosnacek <omosnace@redhat.com>
[PM: merged portions by hand]
Reviewed-by: Stephen Smalley <sds@tycho.nsa.gov>
Signed-off-by: Paul Moore <paul@paul-moore.com>1 parent cb89e24 commit dd89b9d
1 file changed
Lines changed: 13 additions & 15 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2183 | 2183 | | |
2184 | 2184 | | |
2185 | 2185 | | |
2186 | | - | |
2187 | | - | |
2188 | | - | |
2189 | | - | |
2190 | | - | |
2191 | | - | |
2192 | | - | |
2193 | 2186 | | |
2194 | 2187 | | |
2195 | 2188 | | |
2196 | | - | |
2197 | | - | |
2198 | | - | |
2199 | | - | |
| 2189 | + | |
| 2190 | + | |
2200 | 2191 | | |
2201 | 2192 | | |
2202 | 2193 | | |
2203 | 2194 | | |
2204 | 2195 | | |
2205 | | - | |
| 2196 | + | |
2206 | 2197 | | |
2207 | 2198 | | |
2208 | 2199 | | |
| |||
2211 | 2202 | | |
2212 | 2203 | | |
2213 | 2204 | | |
2214 | | - | |
| 2205 | + | |
2215 | 2206 | | |
2216 | 2207 | | |
2217 | 2208 | | |
2218 | 2209 | | |
2219 | 2210 | | |
2220 | 2211 | | |
2221 | | - | |
| 2212 | + | |
2222 | 2213 | | |
2223 | 2214 | | |
2224 | 2215 | | |
| |||
2231 | 2222 | | |
2232 | 2223 | | |
2233 | 2224 | | |
2234 | | - | |
| 2225 | + | |
2235 | 2226 | | |
2236 | 2227 | | |
| 2228 | + | |
| 2229 | + | |
| 2230 | + | |
| 2231 | + | |
| 2232 | + | |
| 2233 | + | |
| 2234 | + | |
2237 | 2235 | | |
2238 | 2236 | | |
2239 | 2237 | | |
| |||
0 commit comments