plugins/python/regress: still some memleak fix

This commit is contained in:
Robert Manner
2020-02-12 17:18:56 +01:00
committed by Todd C. Miller
parent 0e4c3c47d1
commit d1f94c857c

View File

@@ -373,7 +373,7 @@ int
check_io_plugin_reports_error(void)
{
const char *errstr = NULL;
free(data.plugin_options);
str_array_free(&data.plugin_options);
data.plugin_options = create_str_array(
3,
"ModulePath=" SRC_DIR "/regress/plugin_errorstr.py",
@@ -390,7 +390,7 @@ check_io_plugin_reports_error(void)
python_io->close(0, 0);
free(data.plugin_options);
str_array_free(&data.plugin_options);
data.plugin_options = create_str_array(
3,
"ModulePath=" SRC_DIR "/regress/plugin_errorstr.py",
@@ -889,7 +889,7 @@ int
check_policy_plugin_reports_error(void)
{
const char *errstr = NULL;
free(data.plugin_options);
str_array_free(&data.plugin_options);
data.plugin_options = create_str_array(
3,
"ModulePath=" SRC_DIR "/regress/plugin_errorstr.py",
@@ -905,7 +905,7 @@ check_policy_plugin_reports_error(void)
python_policy->close(0, 0);
free(data.plugin_options);
str_array_free(&data.plugin_options);
data.plugin_options = create_str_array(
3,
"ModulePath=" SRC_DIR "/regress/plugin_errorstr.py",
@@ -914,7 +914,7 @@ check_policy_plugin_reports_error(void)
);
data.plugin_argc = 1;
free(data.plugin_argv);
str_array_free(&data.plugin_argv);
data.plugin_argv = create_str_array(2, "id", NULL);
VERIFY_INT(python_policy->open(SUDO_API_VERSION, fake_conversation, fake_printf, data.settings,