diff options
Diffstat (limited to 'security')
-rw-r--r-- | security/apparmor/lib.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/security/apparmor/lib.c b/security/apparmor/lib.c index fa49b81eb54c..5eda003c0d45 100644 --- a/security/apparmor/lib.c +++ b/security/apparmor/lib.c @@ -136,7 +136,7 @@ __counted char *aa_str_alloc(int size, gfp_t gfp) { struct counted_str *str; - str = kmalloc(sizeof(struct counted_str) + size, gfp); + str = kmalloc(struct_size(str, name, size), gfp); if (!str) return NULL; |