[Intel-gfx] [PATCH 2/6] drmtest: don't leak memory when parsing the arguments

Paulo Zanoni przanoni at gmail.com
Mon Dec 30 16:56:49 CET 2013


From: Paulo Zanoni <paulo.r.zanoni at intel.com>

Found this while investigating memory leaks on kms_flip. Detected by
Valgrind.

Signed-off-by: Paulo Zanoni <paulo.r.zanoni at intel.com>
---
 lib/drmtest.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/lib/drmtest.c b/lib/drmtest.c
index 3d79a4d..7275b7f 100644
--- a/lib/drmtest.c
+++ b/lib/drmtest.c
@@ -911,6 +911,8 @@ int igt_subtest_init_parse_opts(int argc, char **argv,
 	oom_adjust_for_doom();
 
 out:
+	free(short_opts);
+	free(combined_opts);
 	print_version();
 
 	return ret;
-- 
1.8.3.1




More information about the Intel-gfx mailing list