diff options
-rw-r--r-- | security/apparmor/policy_unpack.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/security/apparmor/policy_unpack.c b/security/apparmor/policy_unpack.c index 5c46acf5aa65..c50634b724b5 100644 --- a/security/apparmor/policy_unpack.c +++ b/security/apparmor/policy_unpack.c | |||
@@ -84,7 +84,7 @@ static void audit_cb(struct audit_buffer *ab, void *va) | |||
84 | * @new: profile if it has been allocated (MAYBE NULL) | 84 | * @new: profile if it has been allocated (MAYBE NULL) |
85 | * @name: name of the profile being manipulated (MAYBE NULL) | 85 | * @name: name of the profile being manipulated (MAYBE NULL) |
86 | * @info: any extra info about the failure (MAYBE NULL) | 86 | * @info: any extra info about the failure (MAYBE NULL) |
87 | * @e: buffer position info (NOT NULL) | 87 | * @e: buffer position info |
88 | * @error: error code | 88 | * @error: error code |
89 | * | 89 | * |
90 | * Returns: %0 or error | 90 | * Returns: %0 or error |
@@ -95,7 +95,8 @@ static int audit_iface(struct aa_profile *new, const char *name, | |||
95 | struct aa_profile *profile = __aa_current_profile(); | 95 | struct aa_profile *profile = __aa_current_profile(); |
96 | struct common_audit_data sa; | 96 | struct common_audit_data sa; |
97 | COMMON_AUDIT_DATA_INIT(&sa, NONE); | 97 | COMMON_AUDIT_DATA_INIT(&sa, NONE); |
98 | sa.aad.iface.pos = e->pos - e->start; | 98 | if (e) |
99 | sa.aad.iface.pos = e->pos - e->start; | ||
99 | sa.aad.iface.target = new; | 100 | sa.aad.iface.target = new; |
100 | sa.aad.name = name; | 101 | sa.aad.name = name; |
101 | sa.aad.info = info; | 102 | sa.aad.info = info; |