File tree Expand file tree Collapse file tree 1 file changed +6
-0
lines changed Expand file tree Collapse file tree 1 file changed +6
-0
lines changed Original file line number Diff line number Diff line change @@ -281,6 +281,8 @@ static void policy_unpack_test_unpack_strdup_with_null_name(struct kunit *test)
281
281
((uintptr_t )puf -> e -> start <= (uintptr_t )string )
282
282
&& ((uintptr_t )string <= (uintptr_t )puf -> e -> end ));
283
283
KUNIT_EXPECT_STREQ (test , string , TEST_STRING_DATA );
284
+
285
+ kfree (string );
284
286
}
285
287
286
288
static void policy_unpack_test_unpack_strdup_with_name (struct kunit * test )
@@ -296,6 +298,8 @@ static void policy_unpack_test_unpack_strdup_with_name(struct kunit *test)
296
298
((uintptr_t )puf -> e -> start <= (uintptr_t )string )
297
299
&& ((uintptr_t )string <= (uintptr_t )puf -> e -> end ));
298
300
KUNIT_EXPECT_STREQ (test , string , TEST_STRING_DATA );
301
+
302
+ kfree (string );
299
303
}
300
304
301
305
static void policy_unpack_test_unpack_strdup_out_of_bounds (struct kunit * test )
@@ -313,6 +317,8 @@ static void policy_unpack_test_unpack_strdup_out_of_bounds(struct kunit *test)
313
317
KUNIT_EXPECT_EQ (test , size , 0 );
314
318
KUNIT_EXPECT_NULL (test , string );
315
319
KUNIT_EXPECT_PTR_EQ (test , puf -> e -> pos , start );
320
+
321
+ kfree (string );
316
322
}
317
323
318
324
static void policy_unpack_test_unpack_nameX_with_null_name (struct kunit * test )
You can’t perform that action at this time.
0 commit comments