Skip to content

Commit 6ad418a

Browse files
committed
gh-145204: Fix LSan leak in test_initconfig_get_api
1 parent f8ce51a commit 6ad418a

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

Programs/_testembed.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1843,6 +1843,7 @@ static int test_initconfig_get_api(void)
18431843
char **items;
18441844
assert(PyInitConfig_GetStrList(config, "xoptions", &length, &items) == 0);
18451845
assert(length == 0);
1846+
PyInitConfig_FreeStrList(length, items);
18461847

18471848
char* xoptions[] = {"faulthandler"};
18481849
assert(PyInitConfig_SetStrList(config, "xoptions",
@@ -1865,6 +1866,7 @@ static int test_initconfig_get_api(void)
18651866
Py_ARRAY_LENGTH(paths), paths) == 0);
18661867
assert(initconfig_getint(config, "module_search_paths_set") == 1);
18671868

1869+
PyInitConfig_Free(config);
18681870
return 0;
18691871
}
18701872

0 commit comments

Comments
 (0)