summaryrefslogtreecommitdiff
path: root/lib/igt_core.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/igt_core.c')
-rw-r--r--lib/igt_core.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/lib/igt_core.c b/lib/igt_core.c
index 028ef6bd..03d9a5bf 100644
--- a/lib/igt_core.c
+++ b/lib/igt_core.c
@@ -637,10 +637,16 @@ static int config_parse(void)
"FrameDumpPath",
&error);
+ g_clear_error(&error);
+
rc = g_key_file_get_integer(igt_key_file, "DUT", "SuspendResumeDelay",
&error);
- if (error && error->code == G_KEY_FILE_ERROR_INVALID_VALUE)
+ if (error && error->code == G_KEY_FILE_ERROR_INVALID_VALUE) {
+ g_error_free(error);
return -2;
+ }
+
+ g_clear_error(&error);
if (rc != 0)
igt_set_autoresume_delay(rc);
@@ -809,6 +815,7 @@ static int common_init(int *argc, char **argv,
ret = g_key_file_load_from_file(igt_key_file, key_file_loc,
G_KEY_FILE_NONE, &error);
if (error && error->code == G_KEY_FILE_ERROR) {
+ g_error_free(error);
g_key_file_free(igt_key_file);
igt_key_file = NULL;
ret = -2;
@@ -816,6 +823,8 @@ static int common_init(int *argc, char **argv,
goto out;
}
+ g_clear_error(&error);
+
ret = config_parse();
#endif