Skip to content
Snippets Groups Projects
Commit d179276f authored by Lucas De Marchi's avatar Lucas De Marchi
Browse files

runner: Free settings at the end


Keep valgrind happy with the normal allocations so we can find the real
leaks. Avoid this kind of leak:

	==806592== 8 bytes in 1 blocks are definitely lost in loss record 46 of 188
	==806592==    at 0x4846828: malloc (in /usr/libexec/valgrind/vgpreload_memcheck-amd64-linux.so)
	==806592==    by 0x4BD534E: strdup (strdup.c:42)
	==806592==    by 0x10E6AA: parse_options (settings.c:863)
	==806592==    by 0x10D2DD: main (runner.c:19)

This only fixes the leaks on success. The error path handling on both
igt_resume and igt_runner will need some more work on how they are
interacting with all the initializations/cleanups.

Tested-by: default avatarPeter Senna Tschudin <peter.senna@linux.intel.com>
Reviewed-by: default avatarPeter Senna Tschudin <peter.senna@linux.intel.com>
Reviewed-by: default avatarGustavo Sousa <gustavo.sousa@intel.com>
Link: https://lore.kernel.org/r/20250207231039.2883195-4-lucas.demarchi@intel.com


Signed-off-by: default avatarLucas De Marchi <lucas.demarchi@intel.com>
parent 32fca968
No related branches found
No related tags found
No related merge requests found
......@@ -55,6 +55,8 @@ int main(int argc, char **argv)
exitcode = 3;
}
clear_settings(&settings);
printf("Done.\n");
return exitcode;
}
......@@ -49,6 +49,8 @@ int main(int argc, char **argv)
exitcode = 1;
}
clear_settings(&settings);
printf("Done.\n");
return exitcode;
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment