diff options
Diffstat (limited to 'fs/afs/addr_prefs.c')
| -rw-r--r-- | fs/afs/addr_prefs.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/afs/addr_prefs.c b/fs/afs/addr_prefs.c index c0384201b8fe..e8c0640f1c5b 100644 --- a/fs/afs/addr_prefs.c +++ b/fs/afs/addr_prefs.c @@ -48,7 +48,7 @@ static int afs_split_string(char **pbuf, char *strv[], unsigned int maxstrv) strv[count++] = p; /* Skip over word */ - while (!isspace(*p)) + while (!isspace(*p) && *p) p++; if (!*p) break; @@ -401,7 +401,7 @@ int afs_proc_addr_prefs_write(struct file *file, char *buf, size_t size) max_prefs = min_t(size_t, (psize - sizeof(*old)) / sizeof(old->prefs[0]), 255); ret = -ENOMEM; - preflist = kmalloc(struct_size(preflist, prefs, max_prefs), GFP_KERNEL); + preflist = kmalloc_flex(*preflist, prefs, max_prefs); if (!preflist) goto done; |
