diff options
Diffstat (limited to 'lib/kunit/executor.c')
-rw-r--r-- | lib/kunit/executor.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/kunit/executor.c b/lib/kunit/executor.c index bab3ab940acc..1d7fecd33261 100644 --- a/lib/kunit/executor.c +++ b/lib/kunit/executor.c @@ -33,7 +33,7 @@ static void kunit_parse_filter_glob(struct kunit_test_filter *parsed, const char *period = strchr(filter_glob, '.'); if (!period) { - parsed->suite_glob = kmalloc(len, GFP_KERNEL); + parsed->suite_glob = kzalloc(len + 1, GFP_KERNEL); parsed->test_glob = NULL; strcpy(parsed->suite_glob, filter_glob); return; |